]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fixed conffile and dracutmodules handling
authorHarald Hoyer <harald@redhat.com>
Sat, 7 Mar 2009 11:18:09 +0000 (12:18 +0100)
committerHarald Hoyer <harald@redhat.com>
Sat, 7 Mar 2009 11:18:09 +0000 (12:18 +0100)
dracut

diff --git a/dracut b/dracut
index 2bebabe1bca2f801ac5a99a356ebbcd250564450..d1167e53073671028bfebd94d1ec5f13d3850352 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -24,10 +24,9 @@ while (($# > 0)); do
     shift
 done
 
-[[ -f $conffile ]] || [[ -f /etc/dracut.conf ]] && conffile="/etc/dracut.conf"
+[[ -f $conffile ]] || ( [[ -f /etc/dracut.conf ]] && conffile="/etc/dracut.conf" )
 [[ -f $conffile ]] && . "$conffile"
-
-[[ $dracutmodules_l ]] && dracutmodules=$dracutmodule_l
+[[ $dracutmodules_l ]] && dracutmodules=$dracutmodules_l
 [[ $modules_l ]] && modules=$modules_l
 
 [[ $allowlocal && -f dracut-functions ]] && dsrc="." || dsrc=/usr/lib/dracut
@@ -35,6 +34,7 @@ done
 
 [[ $dracutmodules ]] || dracutmodules="all" 
 
+
 [[ $2 ]] && kernel=$2 || kernel=$(uname -r)
 [[ $1 ]] && outfile=$(readlink -f $1) || outfile="/boot/initrd-$kernel.img"
 
@@ -62,7 +62,7 @@ can_source_module() {
        all) return 0;;
        auto) [[ -x $1/check ]] || return 0
            "$1/check" >/dev/null 2>&1 && return 0 ;;
-       *) strstr "$dracutmodules" "$mod" && return 0;;
+       *) strstr "$dracutmodules " "$mod " && return 0;;
     esac
     return 1
 }