Skip to content

Commit c60ca42

Browse files
kernel-install: actually ignore the last two arguments
1 parent e5985a7 commit c60ca42

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

src/kernel-install/kernel-install.in

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,13 @@ fi
8080

8181
if [ "${0##*/}" = "installkernel" ]; then
8282
COMMAND=add
83-
# make install doesn't pass any initrds
84-
no_initrds=1
83+
# kernel's install.sh invokes us as
84+
# /sbin/installkernel <version> <vmlinuz> <map> <installation-dir>
85+
# We ignore the last two arguments.
86+
set -- "$1"
8587
else
8688
COMMAND="$1"
8789
[ $# -ge 1 ] && shift
88-
no_initrds=0
8990
fi
9091

9192
if [ "$COMMAND" = "inspect" ]; then
@@ -323,16 +324,8 @@ case "$COMMAND" in
323324
fi
324325

325326
for f in $PLUGINS; do
326-
if [ "$no_initrds" = 1 ]; then
327-
# kernel's install.sh invokes us as
328-
# /sbin/installkernel <version> <vmlinuz> <map> <installation-dir>
329-
# We ignore the last two arguments.
330-
[ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "+$f add $KERNEL_VERSION $ENTRY_DIR_ABS $1"
331-
"$f" add "$KERNEL_VERSION" "$ENTRY_DIR_ABS" "$1"
332-
else
333-
[ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "+$f add $KERNEL_VERSION $ENTRY_DIR_ABS $*"
334-
"$f" add "$KERNEL_VERSION" "$ENTRY_DIR_ABS" "$@"
335-
fi
327+
[ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "+$f add $KERNEL_VERSION $ENTRY_DIR_ABS $*"
328+
"$f" add "$KERNEL_VERSION" "$ENTRY_DIR_ABS" "$@"
336329

337330
err=$?
338331
[ $err -eq $skip_remaining ] && break

0 commit comments

Comments
 (0)