]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
allow dracut.conf to be local if -l is set
authorHarald Hoyer <harald@redhat.com>
Thu, 5 Mar 2009 09:33:42 +0000 (10:33 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 5 Mar 2009 09:33:42 +0000 (10:33 +0100)
dracut

diff --git a/dracut b/dracut
index dc9b1ad2eaf8c953221fec4bebda9f418872ba7a..bf31d42ab390a1581103d2fad1e0e2c50b2d7282 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -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