]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install: do not fail if a plugin exits with 77 24837/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 28 Sep 2022 04:35:49 +0000 (13:35 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 28 Sep 2022 04:36:38 +0000 (13:36 +0900)
src/kernel-install/kernel-install.in

index aa29f20aad85a48b13f2ddaf5c886663dc0f42e9..22eb4d2be144c30d73d086b2eb65efe68fe44452 100755 (executable)
@@ -349,9 +349,8 @@ case "$COMMAND" in
 
         for f in $KERNEL_INSTALL_PLUGINS; do
             log_verbose "+$f add $KERNEL_VERSION $ENTRY_DIR_ABS" "$@"
-            "$f" add "$KERNEL_VERSION" "$ENTRY_DIR_ABS" "$@"
-
-            err=$?
+            err=0
+            "$f" add "$KERNEL_VERSION" "$ENTRY_DIR_ABS" "$@" || err=$?
             [ $err -eq $skip_remaining ] && break
             [ $err -ne 0 ] && exit $err
         done
@@ -360,8 +359,8 @@ case "$COMMAND" in
     remove)
         for f in $KERNEL_INSTALL_PLUGINS; do
             log_verbose "+$f remove $KERNEL_VERSION $ENTRY_DIR_ABS"
-            "$f" remove "$KERNEL_VERSION" "$ENTRY_DIR_ABS"
-            err=$?
+            err=0
+            "$f" remove "$KERNEL_VERSION" "$ENTRY_DIR_ABS" || err=$?
             [ $err -eq $skip_remaining ] && break
             [ $err -ne 0 ] && exit $err
         done