]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kernel-install: don't erase previous errors if a hook returns 77 19713/head
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Tue, 16 Mar 2021 15:59:07 +0000 (16:59 +0100)
committerнаб <nabijaczleweli@nabijaczleweli.xyz>
Mon, 24 May 2021 19:56:35 +0000 (21:56 +0200)
The manpage says that exiting 77 is the same as exiting 0,
then skipping all other hooks, but the behaviour heretofor
was to exit 0, skip all, and behave as if all hooks exited 0

src/kernel-install/kernel-install

index e7457e9d06cbde5f3ec48a440ebb88d59a5287fc..c9a80b2e3d4649bcb81b2efd06d3f7153b8fdd42 100755 (executable)
@@ -142,7 +142,6 @@ case $COMMAND in
                 "$f" add "$KERNEL_VERSION" "$ENTRY_DIR_ABS" "$KERNEL_IMAGE" "${INITRD_OPTIONS[@]}"
                 x=$?
                 if [[ $x == $SKIP_REMAINING ]]; then
-                    ret=0
                     break
                 fi
                 ((ret+=$x))
@@ -158,7 +157,6 @@ case $COMMAND in
                 "$f" remove "$KERNEL_VERSION" "$ENTRY_DIR_ABS"
                 x=$?
                 if [[ $x == $SKIP_REMAINING ]]; then
-                    ret=0
                     break
                 fi
                 ((ret+=$x))