summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2010-07-06 12:48:56 +0200
committermaximilian attems <maks@debian.org>2010-07-06 12:48:56 +0200
commit0b5ce7cd3e4655af03133718f0a92883425b9c6c (patch)
tree199935a6bf3f5f60cd042cd37b47ca539fb77ebb
parent3bdc6b1d6419359309f261d045bf9c78269b9292 (diff)
downloadinitramfs-tools-0b5ce7cd3e4655af03133718f0a92883425b9c6c.tar.gz
initramfs-tools-0b5ce7cd3e4655af03133718f0a92883425b9c6c.zip
initramfs-tools: output name of script that errexits.
this should make bug reports concerning bogus hook scripts easier to handle, like the *loooong* iscan story. Closes: 586554 Signed-off-by: maximilian attems <maks@debian.org>
-rw-r--r--scripts/functions8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/functions b/scripts/functions
index 364cc27..d42a3cf 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -211,7 +211,6 @@ get_prereq_pairs()
call_scripts()
{
- # allow hooks to abort build:
set -e
for cs_x in ${runlist}; do
[ -f ${initdir}/${cs_x} ] || continue
@@ -219,7 +218,12 @@ call_scripts()
if [ "${verbose}" = "y" ]; then
echo "Calling hook ${cs_x}"
fi
- ${initdir}/${cs_x}
+ ${initdir}/${cs_x} && ec=$? || ec=$?
+ # allow hooks to abort build:
+ if [ "$ec" -ne 0 ]; then
+ echo "E: ${initdir}/${cs_x} failed with return $ec."
+ exit $ec
+ fi
# allow boot scripts to modify exported boot parameters
if [ -e /conf/param.conf ]; then
. /conf/param.conf