X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=grml-debootstrap;h=8994542cd3bc10f67558c9175a4f14d219b5d294;hb=2999d61efa6841d22024fc6c5fde16dc44db8a20;hp=e3404d48e9d9fbb37d7d1de185ba69afe6738e0c;hpb=e8494a4990a6524ea0057f9415dc6ad83d38fd7a;p=grml-debootstrap.git diff --git a/grml-debootstrap b/grml-debootstrap index e3404d4..8994542 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -31,6 +31,7 @@ last bash command: $last_bash_command" } if [ "$REPORT_TRAP_ERR" = "yes" ] || [ "$FAIL_TRAP_ERR" = "yes" ]; then + set -e set -E set -o pipefail trap "error_handler" ERR @@ -2177,7 +2178,8 @@ for i in format_efi_partition prepare_vm mkfs tunefs \ preparechroot execute_pre_scripts chrootscript execute_post_scripts \ remove_configs umount_chroot grub_install umount_target fscktool ; do if stage "${i}" ; then - if "$i" ; then + "$i" + if [ $? -eq 0 ]; then stage "${i}" 'done' && rm -f "${STAGES}/${i}" else bailout 2 "$i"