Skip to content

Commit

Permalink
fix(dracut.sh): do not fail on irregular files
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pvalena authored and johannbg committed Aug 12, 2022
1 parent 897e5ef commit b72d0d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dracut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b72d0d7

Please sign in to comment.