dib: source dib "die" script in some phases

Source the "die" script, part of the diskimage-builder library, when
running hooks that run outside the guest chroot.  This is what
disk-image-create does, and scripts expect to use the "die" function
without sourcing the "die" script containing it.
This commit is contained in:
Pino Toscano
2017-02-08 13:32:12 +01:00
parent 0ab539d82f
commit dfc700d2b5

View File

@@ -124,6 +124,8 @@ if [ -d $ENVIRONMENT_D_DIR ] ; then
done
fi
source $_LIB/die
$target_dir/$script
"
(if debug >= 1 then "set -x\n" else "")
@@ -206,6 +208,7 @@ export TMP_IMAGE_DIR=$mysysroot/tmp/aux
if [ -n \"$mysysroot\" ]; then
export PATH=$mysysroot/tmp/aux/fake-bin:$PATH
source $_LIB/die
else
export PATH=\"$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"
fi