allow dracut.conf to be local if -l is set

master
Harald Hoyer 2009-03-05 10:33:42 +01:00
parent ccd71eeb17
commit b2714d05e2
1 changed files with 10 additions and 1 deletions

11
dracut
View File

@ -8,8 +8,17 @@
# 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

[ -f /etc/dracut.conf ] && . /etc/dracut.conf
if [[ $allowlocal && -f dracut.conf ]]; then
. dracut.conf
else
[ -f /etc/dracut.conf ] && . /etc/dracut.conf
fi

while (($# > 0)); do
case $1 in