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