X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=4d883f333c72c0b3d46663cd7b18b5e22d8dcd37;hp=a06aa7e9d422d1b26be498fc795b07f16c840f4e;hb=cb7144264f65932963e9d2968e91b466eab62be2;hpb=c7c6cfd5ea3dcdfe0c2b627f8e1d698f819a79e4 diff --git a/chroot-script b/chroot-script index a06aa7e..4d883f3 100755 --- a/chroot-script +++ b/chroot-script @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Filename: /etc/debootstrap/chroot-script # Purpose: script executed in chroot when installing Debian via grml-debootstrap # Authors: grml-team (grml.org), (c) Michael Prokop @@ -9,6 +9,14 @@ # this script as /bin/chroot-script on your new installed system ################################################################################ +# error_handler {{{ +if [ "$REPORT_TRAP_ERR" = "yes" ] || [ "$FAIL_TRAP_ERR" = "yes" ]; then + set -E + set -o pipefail + trap "error_handler" ERR +fi +# }}} + . /etc/debootstrap/config || exit 1 . /etc/debootstrap/variables || exit 1