diff options
author | maximilian attems <maks@debian.org> | 2010-08-06 23:59:07 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2010-08-07 00:03:32 +0200 |
commit | a4e1a9ea7321799da65a11bb96413d66b7cb07eb (patch) | |
tree | a17b1b9223ab32db659c571e7b10858f6a2a0daa /scripts | |
parent | 762ae2a78f6b1e9648242a3b3bc4baebc7151e48 (diff) | |
download | initramfs-tools-a4e1a9ea7321799da65a11bb96413d66b7cb07eb.tar.gz initramfs-tools-a4e1a9ea7321799da65a11bb96413d66b7cb07eb.zip |
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>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/functions | 3 |
1 files changed, 2 insertions, 1 deletions
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 |