]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
for "-l" search dracut-functions relative to dracut path
authorHarald Hoyer <harald@redhat.com>
Mon, 25 May 2009 12:09:57 +0000 (14:09 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 25 May 2009 12:09:57 +0000 (14:09 +0200)
dracut

diff --git a/dracut b/dracut
index d5747c2915d985625152d64e87f9286c00dce7d0..4899667636d0bd577bf74a752e1949821aa52ee9 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -73,14 +73,15 @@ done
 [[ $omit_dracutmodules_l ]] && omit_dracutmodules=$omit_dracutmodules_l
 [[ $modules_l ]] && modules=$modules_l
 
-[[ $allowlocal && -f dracut-functions ]] && dsrc="." || dsrc=/usr/lib/dracut
+[[ $allowlocal && -f "$(dirname $0)/dracut-functions" ]] && dsrc="$(dirname $0)" || dsrc=/usr/lib/dracut
 if [[ -f $dsrc/dracut-functions ]]; then
    . $dsrc/dracut-functions
 else
-   echo "Cannot find dracut-functions. Are you running from a git checkout?"
+   echo "Cannot find $dsrc/dracut-functions. Are you running from a git checkout?"
    echo "Try passing -l as an argument to $0"
    exit 1
 fi
+
 dracutfunctions=$dsrc/dracut-functions
 export dracutfunctions