From: Pavel Valena Date: Thu, 21 Jul 2022 15:40:20 +0000 (+0200) Subject: fix(dracut.sh): do not fail on irregular files X-Git-Tag: 058~198 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b72d0d7f9be53c1ad04f132daf0297aff7581e9c;p=thirdparty%2Fdracut.git fix(dracut.sh): do not fail on irregular files If file is not a regular file (test -f), dracut.sh fails, which is unexpected change of behaviour. The workaround would be to create an empty file. Fixes: #1835 --- diff --git a/dracut.sh b/dracut.sh index ebc66cfac..b0506749f 100755 --- a/dracut.sh +++ b/dracut.sh @@ -905,7 +905,7 @@ if [[ -z $conffile ]]; then else conffile="$dracutsysrootdir/etc/dracut.conf" fi -elif [[ ! -f $conffile ]]; then +elif [[ ! -e $conffile ]]; then printf "%s\n" "dracut: Configuration file '$conffile' not found." >&2 exit 1 fi