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
This commit is contained in:
наб
2021-03-16 16:59:07 +01:00
parent 0ad401dc5d
commit 44230fa2b0

View File

@@ -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))