From 9a8a00cff8b9a6bca31339963df5a64ba7bb4ff5 Mon Sep 17 00:00:00 2001 From: Victor Lowther Date: Fri, 6 Mar 2009 14:06:48 -0600 Subject: [PATCH] Some minor formatting fixups in the main dracut script --- dracut | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) 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) -- 2.47.3