]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install: return 0 for unknown verbs in plugins
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 2 Jul 2022 12:44:01 +0000 (14:44 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 12 Jul 2022 07:24:43 +0000 (09:24 +0200)
In practice this makes little difference, because kernel-install will
only call the plugins for 'add' or 'remove', and if we were to add a
new verb to kernel-install, we'd just change the plugins at the same
time. But our plugins serve as documentation for external plugins too,
and there it's better to silently ignore unknown verbs so that we can
add new verbs in the future.

(50-depomod.install was already like that.)

src/kernel-install/50-depmod.install
src/kernel-install/90-loaderentry.install

index fdb7545dc92ab0432b953319f87eb4e776afc0d3..b43333762bc34b1c516f86d67eac7c1e20d90301 100755 (executable)
@@ -44,4 +44,5 @@ case "$COMMAND" in
         ;;
     *)
         exit 0
+        ;;
 esac
index a640ea42ca82cad52e5a1a145e1593db13dea208..96e24194c40e0e2f0da1133c3f2b3da53ccd25a9 100755 (executable)
@@ -48,7 +48,7 @@ case "$COMMAND" in
     add)
         ;;
     *)
-        exit 1
+        exit 0
         ;;
 esac