File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -891,20 +891,26 @@ export DRACUT_LOG_LEVEL=warning
891
891
[[ $dracutbasedir ]] || dracutbasedir=" $dracutsysrootdir " /usr/lib/dracut
892
892
893
893
# if we were not passed a config file, try the default one
894
- if [[ ! -f $conffile ]]; then
894
+ if [[ -z $conffile ]]; then
895
895
if [[ $allowlocal ]]; then
896
896
conffile=" $dracutbasedir /dracut.conf"
897
897
else
898
898
conffile=" $dracutsysrootdir /etc/dracut.conf"
899
899
fi
900
+ elif [[ ! -f $conffile ]]; then
901
+ printf " %s\n" " dracut: Configuration file '$conffile ' not found." >&2
902
+ exit 1
900
903
fi
901
904
902
- if [[ ! -d $confdir ]]; then
905
+ if [[ -z $confdir ]]; then
903
906
if [[ $allowlocal ]]; then
904
907
confdir=" $dracutbasedir /dracut.conf.d"
905
908
else
906
909
confdir=" $dracutsysrootdir /etc/dracut.conf.d"
907
910
fi
911
+ elif [[ ! -d $confdir ]]; then
912
+ printf " %s\n" " dracut: Configuration directory '$confdir ' not found." >&2
913
+ exit 1
908
914
fi
909
915
910
916
# source our config file
You can’t perform that action at this time.
0 commit comments