|
|
ad54c5 |
From 263b9095200cf277db3bff4753b06306175b1534 Mon Sep 17 00:00:00 2001
|
|
|
ad54c5 |
From: Pavel Valena <pvalena@redhat.com>
|
|
|
ad54c5 |
Date: Thu, 21 Jul 2022 17:40:20 +0200
|
|
|
ad54c5 |
Subject: [PATCH] fix(dracut.sh): do not fail on irregular files
|
|
|
c2f1e0 |
|
|
|
ad54c5 |
If file is not a regular file (test -f), dracut.sh fails,
|
|
|
ad54c5 |
which is unexpected change of behaviour.
|
|
|
ad54c5 |
The workaround would be to create an empty file.
|
|
|
c2f1e0 |
|
|
|
ad54c5 |
rhel-only
|
|
|
ad54c5 |
Fixes: #1835
|
|
|
c2f1e0 |
---
|
|
|
ad54c5 |
dracut.sh | 2 +-
|
|
|
ad54c5 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
c2f1e0 |
|
|
|
ad54c5 |
diff --git a/dracut.sh b/dracut.sh
|
|
|
ad54c5 |
index a1ea1bc3..210a8275 100755
|
|
|
ad54c5 |
--- a/dracut.sh
|
|
|
ad54c5 |
+++ b/dracut.sh
|
|
|
ad54c5 |
@@ -905,7 +905,7 @@ if [[ -z $conffile ]]; then
|
|
|
ad54c5 |
else
|
|
|
ad54c5 |
conffile="$dracutsysrootdir/etc/dracut.conf"
|
|
|
c2f1e0 |
fi
|
|
|
ad54c5 |
-elif [[ ! -f $conffile ]]; then
|
|
|
ad54c5 |
+elif [[ ! -e $conffile ]]; then
|
|
|
ad54c5 |
printf "%s\n" "dracut: Configuration file '$conffile' not found." >&2
|
|
|
ad54c5 |
exit 1
|
|
|
c2f1e0 |
fi
|
|
|
c2f1e0 |
|