]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install: actually ignore the last two arguments
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Thu, 26 May 2022 21:16:13 +0000 (23:16 +0200)
committerнаб <nabijaczleweli@nabijaczleweli.xyz>
Thu, 26 May 2022 21:16:13 +0000 (23:16 +0200)
src/kernel-install/kernel-install.in

index 5f88ac2490ee1a880716f1dc58451198a6d658ed..96c50ba6337f4d943caa2673112565f317525fa1 100755 (executable)
@@ -80,12 +80,13 @@ fi
 
 if [ "${0##*/}" = "installkernel" ]; then
     COMMAND=add
-    # make install doesn't pass any initrds
-    no_initrds=1
+    # kernel's install.sh invokes us as
+    #   /sbin/installkernel <version> <vmlinuz> <map> <installation-dir>
+    # We ignore the last two arguments.
+    set -- "$1"
 else
     COMMAND="$1"
     [ $# -ge 1 ] && shift
-    no_initrds=0
 fi
 
 if [ "$COMMAND" = "inspect" ]; then
@@ -323,16 +324,8 @@ case "$COMMAND" in
         fi
 
         for f in $PLUGINS; do
-            if [ "$no_initrds" = 1 ]; then
-                # kernel's install.sh invokes us as
-                #   /sbin/installkernel <version> <vmlinuz> <map> <installation-dir>
-                # 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
+            [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "+$f add $KERNEL_VERSION $ENTRY_DIR_ABS $*"
+            "$f" add "$KERNEL_VERSION" "$ENTRY_DIR_ABS" "$@"
 
             err=$?
             [ $err -eq $skip_remaining ] && break