From 4b7bcd8bb312afbc7eb0be80f72c1cc99566a56b Mon Sep 17 00:00:00 2001 From: Stefan Schlesinger Date: Thu, 15 Dec 2016 18:45:08 +0100 Subject: [PATCH] Export TARGET_HOSTNAME before running post-scripts Export $HOSTNAME in TARGET_HOSTNAME so one is able to do customize things based upon the hostname of the installed machine (eg. to populate /e/n/interfaces by doing a external database lookup). --- grml-debootstrap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/grml-debootstrap b/grml-debootstrap index 5b5ad44..b158645 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -1530,8 +1530,9 @@ execute_pre_scripts() { # execute all scripts in /etc/debootstrap/post-scripts/ {{{ execute_post_scripts() { - # make sure we have $MNTPOINT available for our scripts + # make sure we have $MNTPOINT and HOSTNAME available for our scripts export MNTPOINT + export TARGET_HOSTNAME=$HOSTNAME if [ -d "$_opt_scripts" ] || [ "$SCRIPTS" = 'yes' ] ; then # legacy support for /etc/debootstrap/scripts/ -- 2.1.4