]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Some minor formatting fixups in the main dracut script
authorVictor Lowther <victor.lowther@gmail.com>
Fri, 6 Mar 2009 20:06:48 +0000 (14:06 -0600)
committerVictor Lowther <victor.lowther@gmail.com>
Fri, 6 Mar 2009 20:06:48 +0000 (14:06 -0600)
dracut

diff --git a/dracut b/dracut
index a691a66ff37bd79482a7d40214e3b70cf5129dfa..04c64573054ec7dc7a286068bd624762536a8f11 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -8,18 +8,6 @@
 # Copyright 2008, Red Hat, Inc.  Jeremy Katz <katzj@redhat.com>
 # 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)