File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,10 @@ install -g root -o root -m 0644 "$KERNEL_IMAGE" "$ENTRY_DIR_ABS/linux" || {
9393
9494shift " $INITRD_OPTIONS_SHIFT "
9595for initrd; do
96- [ -f " $initrd " ] || continue
96+ [ -f " $initrd " ] || {
97+ echo " Initrd '$initrd ' not a file." >&2
98+ exit 1
99+ }
97100
98101 initrd_basename=" ${initrd##*/ } "
99102 [ " $KERNEL_INSTALL_VERBOSE " -gt 0 ] && echo " Installing $ENTRY_DIR_ABS /$initrd_basename "
@@ -108,9 +111,6 @@ mkdir -p "${LOADER_ENTRY%/*}" || {
108111 exit 1
109112}
110113
111- # Try "initrd", generated by dracut in its kernel-install hook, if no initrds were supplied
112- [ $# -eq 0 ] && set -- " initrd"
113-
114114[ " $KERNEL_INSTALL_VERBOSE " -gt 0 ] && echo " Creating $LOADER_ENTRY "
115115{
116116 echo " title $PRETTY_NAME "
@@ -119,8 +119,10 @@ mkdir -p "${LOADER_ENTRY%/*}" || {
119119 echo " options $BOOT_OPTIONS "
120120 echo " linux $ENTRY_DIR /linux"
121121 for initrd; do
122- [ -f " $ENTRY_DIR_ABS / ${initrd ##*/ } " ] && echo " initrd $ENTRY_DIR /${initrd##*/ } "
122+ echo " initrd $ENTRY_DIR /${initrd##*/ } "
123123 done
124+ # Try "initrd", generated by dracut in its kernel-install hook, if no initrds were supplied
125+ [ $# -eq 0 ] && [ -f " $ENTRY_DIR_ABS /initrd" ] && echo " initrd $ENTRY_DIR /initrd"
124126 :
125127} > " $LOADER_ENTRY " || {
126128 echo " Could not create loader entry '$LOADER_ENTRY '." >&2
You can’t perform that action at this time.
0 commit comments