diff --git a/README.md b/README.md index 07e81006..3eb6850c 100644 --- a/README.md +++ b/README.md @@ -326,6 +326,8 @@ comma-delimited string. Some examples: * break=after-first-boot,before-pre-install will break after the first-boot hooks and before the pre-install hooks. +* break=after-error will break after an error during a in target hookpoint. + Images are built such that the Linux kernel is instructed not to switch into graphical consoles (i.e. it will not activate KMS). This maximises compatibility with remote console interception hardware, such as HP's iLO. diff --git a/bin/disk-image-create b/bin/disk-image-create index d36477ce..aadc7b6c 100755 --- a/bin/disk-image-create +++ b/bin/disk-image-create @@ -15,7 +15,7 @@ # License for the specific language governing permissions and limitations # under the License. -set -e +set -eE # Prevent perl from complaining a lot, but also remove any unexpected side-effects # of $LANG varying between build hosts diff --git a/lib/img-functions b/lib/img-functions index 58515100..40844d64 100644 --- a/lib/img-functions +++ b/lib/img-functions @@ -78,7 +78,9 @@ function run_d_in_target () { mkdir -p $DIB_CCACHE_DIR sudo mount --bind $DIB_CCACHE_DIR $TMP_MOUNT_PATH/tmp/ccache check_break before-$1 run_in_target bash + trap "check_break after-error run_in_target bash" ERR run_in_target dib-run-parts /tmp/in_target.d/$1.d + trap - ERR check_break after-$1 run_in_target bash sudo umount -f $TMP_MOUNT_PATH/tmp/in_target.d sudo rmdir $TMP_MOUNT_PATH/tmp/in_target.d