mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 17:06:39 +09:00
kernel-install: if a plugin fails, return error immediately
Since the first version in 81516adcb7,
kernel-install would "gather" a return value by summing the exit codes
of the plugins… This makes no sense, because those are not additive values.
Let's just break off immediately. We now implement cleanup via trap, so if we
break, we should leave no garbage behind.
This commit is contained in:
@@ -336,7 +336,7 @@ case "$COMMAND" in
|
||||
|
||||
err=$?
|
||||
[ $err -eq $skip_remaining ] && break
|
||||
ret=$(( ret + err ))
|
||||
[ $err -ne 0 ] && exit $err
|
||||
done
|
||||
;;
|
||||
|
||||
@@ -346,7 +346,7 @@ case "$COMMAND" in
|
||||
"$f" remove "$KERNEL_VERSION" "$ENTRY_DIR_ABS"
|
||||
err=$?
|
||||
[ $err -eq $skip_remaining ] && break
|
||||
ret=$(( ret + err ))
|
||||
[ $err -ne 0 ] && exit $err
|
||||
done
|
||||
|
||||
if [ "$MAKE_ENTRY_DIR_ABS" -eq 0 ]; then
|
||||
|
||||
Reference in New Issue
Block a user