diff --git a/dracut b/dracut index a691a66f..04c64573 100755 --- a/dracut +++ b/dracut @@ -8,18 +8,6 @@ # Copyright 2008, Red Hat, Inc. Jeremy Katz # GPLv2 header here -for i in "$@"; do - case $i in - -l|--local) allowlocal="yes" ;; - esac -done - -if [[ $allowlocal && -f dracut.conf ]]; then - . dracut.conf -else - [ -f /etc/dracut.conf ] && . /etc/dracut.conf -fi - while (($# > 0)); do case $1 in -f|--force) force=yes;; @@ -33,6 +21,13 @@ while (($# > 0)); do esac shift done +conffile="/etc/dracut.conf" +[[ $allowlocal && -f dracut.conf ]] && conffile="dracut.conf" +. "$conffile" + +[[ $allowlocal && -f dracut-functions ]] && dsrc="." || dsrc=/usr/lib/dracut +. $dsrc/dracut-functions + [[ $dracutmodules ]] || dracutmodules="all" [[ $2 ]] && kernel=$2 || kernel=$(uname -r) @@ -43,9 +38,6 @@ if [[ -f $outfile && ! $force ]]; then exit 1 fi -[[ $allowlocal && -f dracut-functions ]] && dsrc="." || dsrc=/usr/lib/dracut -. $dsrc/dracut-functions - hookdirs="pre-udev pre-mount pre-pivot mount" readonly initdir=$(mktemp -d -t initramfs.XXXXXX)