File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 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
891891[[ $dracutbasedir ]] || dracutbasedir=" $dracutsysrootdir " /usr/lib/dracut
892892
893893# if we were not passed a config file, try the default one
894- if [[ ! -f $conffile ]]; then
894+ if [[ -z $conffile ]]; then
895895 if [[ $allowlocal ]]; then
896896 conffile=" $dracutbasedir /dracut.conf"
897897 else
898898 conffile=" $dracutsysrootdir /etc/dracut.conf"
899899 fi
900+ elif [[ ! -f $conffile ]]; then
901+ printf " %s\n" " dracut: Configuration file '$conffile ' not found." >&2
902+ exit 1
900903fi
901904
902- if [[ ! -d $confdir ]]; then
905+ if [[ -z $confdir ]]; then
903906 if [[ $allowlocal ]]; then
904907 confdir=" $dracutbasedir /dracut.conf.d"
905908 else
906909 confdir=" $dracutsysrootdir /etc/dracut.conf.d"
907910 fi
911+ elif [[ ! -d $confdir ]]; then
912+ printf " %s\n" " dracut: Configuration directory '$confdir ' not found." >&2
913+ exit 1
908914fi
909915
910916# source our config file
You can’t perform that action at this time.
0 commit comments