Browse Source

Some minor formatting fixups in the main dracut script

master
Victor Lowther 16 years ago
parent
commit
9a8a00cff8
  1. 22
      dracut

22
dracut

@ -8,18 +8,6 @@
# Copyright 2008, Red Hat, Inc. Jeremy Katz <katzj@redhat.com> # Copyright 2008, Red Hat, Inc. Jeremy Katz <katzj@redhat.com>
# GPLv2 header here # 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 while (($# > 0)); do
case $1 in case $1 in
-f|--force) force=yes;; -f|--force) force=yes;;
@ -33,6 +21,13 @@ while (($# > 0)); do
esac esac
shift shift
done 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" [[ $dracutmodules ]] || dracutmodules="all"


[[ $2 ]] && kernel=$2 || kernel=$(uname -r) [[ $2 ]] && kernel=$2 || kernel=$(uname -r)
@ -43,9 +38,6 @@ if [[ -f $outfile && ! $force ]]; then
exit 1 exit 1
fi fi


[[ $allowlocal && -f dracut-functions ]] && dsrc="." || dsrc=/usr/lib/dracut
. $dsrc/dracut-functions

hookdirs="pre-udev pre-mount pre-pivot mount" hookdirs="pre-udev pre-mount pre-pivot mount"


readonly initdir=$(mktemp -d -t initramfs.XXXXXX) readonly initdir=$(mktemp -d -t initramfs.XXXXXX)

Loading…
Cancel
Save