From: Stefan Schlesinger Date: Thu, 15 Dec 2016 17:45:08 +0000 (+0100) Subject: Export TARGET_HOSTNAME before running post-scripts X-Git-Tag: v0.77~5 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=4b7bcd8bb312afbc7eb0be80f72c1cc99566a56b 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). --- 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/