X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=e189e4755cfa8bf85f910f363c08c90dcb9f097d;hp=a06aa7e9d422d1b26be498fc795b07f16c840f4e;hb=aba5a80ceb27cb034ad847afa41c2a5d645f0916;hpb=c7c6cfd5ea3dcdfe0c2b627f8e1d698f819a79e4 diff --git a/chroot-script b/chroot-script index a06aa7e..e189e47 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 @@ -154,8 +162,8 @@ EOF apt-get update $DPKG_OPTIONS else # make sure we have the keys available for aptitude - gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787 - gpg --export F61E2E7CECDEA787 | apt-key add - || true # not yet sure + gpg --keyserver subkeys.pgp.net --recv-keys 709BCE51568573EBC160E590F61E2E7CECDEA787 + gpg --export 709BCE51568573EBC160E590F61E2E7CECDEA787 | apt-key add - || true # not yet sure # why it's necessary, sometimes we get an error even though it works [mika] fi