From a4e1a9ea7321799da65a11bb96413d66b7cb07eb Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 6 Aug 2010 23:59:07 +0200 Subject: 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 --- scripts/functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/functions') diff --git a/scripts/functions b/scripts/functions index d42a3cf..1e2aeee 100644 --- a/scripts/functions +++ b/scripts/functions @@ -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 -- cgit v1.2.3