From: наб Date: Tue, 16 Mar 2021 15:59:07 +0000 (+0100) Subject: kernel-install: don't erase previous errors if a hook returns 77 X-Git-Tag: v249-rc1~163^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F19713%2Fhead;p=thirdparty%2Fsystemd.git kernel-install: don't erase previous errors if a hook returns 77 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 --- diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install index e7457e9d06c..c9a80b2e3d4 100755 --- a/src/kernel-install/kernel-install +++ b/src/kernel-install/kernel-install @@ -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))