]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(dracut.sh): do not fail on irregular files
authorPavel Valena <pvalena@redhat.com>
Thu, 21 Jul 2022 15:40:20 +0000 (17:40 +0200)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Fri, 12 Aug 2022 11:14:05 +0000 (11:14 +0000)
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
dracut.sh

index ebc66cfac1d1331ddc63490fd25243b968c9be62..b0506749fb3ab2a919b9edf8f31f8f05235187e5 100755 (executable)
--- 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