From b2714d05e2f0a202ba1373d595aa85dfee2ee826 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 5 Mar 2009 10:33:42 +0100 Subject: [PATCH] allow dracut.conf to be local if -l is set --- dracut | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- 2.47.3