diff --git a/src/kernel-install/kernel-install.in b/src/kernel-install/kernel-install.in index c6c74cc792..5f88ac2490 100755 --- a/src/kernel-install/kernel-install.in +++ b/src/kernel-install/kernel-install.in @@ -81,9 +81,11 @@ fi if [ "${0##*/}" = "installkernel" ]; then COMMAND=add # make install doesn't pass any initrds + no_initrds=1 else COMMAND="$1" [ $# -ge 1 ] && shift + no_initrds=0 fi if [ "$COMMAND" = "inspect" ]; then @@ -321,8 +323,17 @@ case "$COMMAND" in fi for f in $PLUGINS; do - [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "+$f add $KERNEL_VERSION $ENTRY_DIR_ABS $*" - "$f" add "$KERNEL_VERSION" "$ENTRY_DIR_ABS" "$@" + if [ "$no_initrds" = 1 ]; then + # kernel's install.sh invokes us as + # /sbin/installkernel + # We ignore the last two arguments. + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "+$f add $KERNEL_VERSION $ENTRY_DIR_ABS $1" + "$f" add "$KERNEL_VERSION" "$ENTRY_DIR_ABS" "$1" + else + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "+$f add $KERNEL_VERSION $ENTRY_DIR_ABS $*" + "$f" add "$KERNEL_VERSION" "$ENTRY_DIR_ABS" "$@" + fi + err=$? [ $err -eq $skip_remaining ] && break ret=$(( ret + err ))