From: Victor Lowther Date: Fri, 6 Mar 2009 20:06:48 +0000 (-0600) Subject: Some minor formatting fixups in the main dracut script X-Git-Tag: 0.1~330 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9a8a00cff8b9a6bca31339963df5a64ba7bb4ff5;p=thirdparty%2Fdracut.git Some minor formatting fixups in the main dracut script --- diff --git a/dracut b/dracut index a691a66ff..04c645730 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)