From: Harald Hoyer Date: Thu, 5 Mar 2009 09:33:42 +0000 (+0100) Subject: allow dracut.conf to be local if -l is set X-Git-Tag: 0.1~383 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b2714d05e2f0a202ba1373d595aa85dfee2ee826;p=thirdparty%2Fdracut.git allow dracut.conf to be local if -l is set --- diff --git a/dracut b/dracut index dc9b1ad2e..bf31d42ab 100755 --- a/dracut +++ b/dracut @@ -8,8 +8,17 @@ # Copyright 2008, Red Hat, Inc. Jeremy Katz # 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