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.
---
dib/dib.ml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dib/dib.ml b/dib/dib.ml
index 54ea2ae..6a0145d 100644
--- a/dib/dib.ml
+++ b/dib/dib.ml
@@ -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
--
2.9.3