diff options
| author | maximilian attems <maks@debian.org> | 2010-07-06 12:51:12 +0200 | 
|---|---|---|
| committer | maximilian attems <maks@debian.org> | 2010-07-06 12:51:12 +0200 | 
| commit | ce732c34bed22a712591f8459d8a0bb59ac91856 (patch) | |
| tree | f24bd1a0c611a6ba34b7e4819f7ddb95fa2fd16a | |
| parent | 89a79c1c9f15220a377fd11d49687e17b2958062 (diff) | |
| download | initramfs-tools-ce732c34bed22a712591f8459d8a0bb59ac91856.tar.gz initramfs-tools-ce732c34bed22a712591f8459d8a0bb59ac91856.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/functions | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/scripts/functions b/scripts/functions index 56ae1e1..1292fd6 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 paramaters  		if [ -e /conf/param.conf ]; then  			. /conf/param.conf | 
