From: Michael Prokop Date: Sat, 7 Mar 2009 13:15:54 +0000 (+0100) Subject: Provide $MNTPOINT as environment variable X-Git-Tag: v0.25~1 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=35cefbcdbd6633223fea03a7c61b8b249813dfa3;hp=d3c9bd094bf6ee7aee342b90090d04cc0a9f3095 Provide $MNTPOINT as environment variable --- diff --git a/debian/changelog b/debian/changelog index b2d224b..f8b2255 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,8 +8,10 @@ grml-debootstrap (0.24) unstable; urgency=low * Move asciidoc, docbook-xsl, xsltproc to Build-Depends-Indep. * Drop $CHROOTMIRROR variable, instead use $MIRROR for debootstrap as well as inside the chroot. + * Provide $MNTPOINT as environment variable for usage inside + /etc/debootstrap/scripts/. - -- Michael Prokop Sat, 07 Mar 2009 14:12:43 +0100 + -- Michael Prokop Sat, 07 Mar 2009 14:15:32 +0100 grml-debootstrap (0.23) unstable; urgency=low diff --git a/grml-debootstrap b/grml-debootstrap index a0db99d..9f18ad7 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -811,6 +811,8 @@ preparechroot() { # execute all scripts in /etc/debootstrap/scripts/ {{{ execute_scripts() { + # make sure we have $MNTPOINT available for our scripts + export MNTPOINT if [ -d "$_opt_scripts" ] || [ "$SCRIPTS" = 'yes' ] ; then [ -d "$_opt_scripts" ] && scripts="$_opt_scripts" || scripts="$CONFFILES/scripts/" for script in ${scripts}/* ; do diff --git a/grml-debootstrap.8.txt b/grml-debootstrap.8.txt index 2c69412..9e5f591 100644 --- a/grml-debootstrap.8.txt +++ b/grml-debootstrap.8.txt @@ -123,7 +123,8 @@ Options and environment variables *--scripts* <_directory_>:: Execute scripts from specified directory. This allows customisation of - the system after the chroot has been set up. + the system after the chroot has been set up. The environment variable + $MNTPOINT is available inside the scripts for direct access of the chroot. Default directory: /etc/debootstrap/scripts/ *-t*, *--target* <_target_>::