mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
initramfs-tools: only allow hook scripts to errexit on mkinitramfs
version is "the" essential exported variable by mkinitramfs. Use it's string length to determine that we are on mkinitramfs stage and not trying to boot a not precached initramfs image. hook scripts on boot can exit due to random failures and shouldn't interrupt boot there. Signed-off-by: maximilian attems <maks@debian.org>
This commit is contained in:
parent
762ae2a78f
commit
a4e1a9ea73
@ -222,7 +222,8 @@ call_scripts()
|
||||
# allow hooks to abort build:
|
||||
if [ "$ec" -ne 0 ]; then
|
||||
echo "E: ${initdir}/${cs_x} failed with return $ec."
|
||||
exit $ec
|
||||
# only errexit on mkinitramfs
|
||||
[ -n "${version}" ] && exit $ec
|
||||
fi
|
||||
# allow boot scripts to modify exported boot parameters
|
||||
if [ -e /conf/param.conf ]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user