Provide $MNTPOINT as environment variable
[grml-debootstrap.git] / grml-debootstrap
index 2e419a8..9f18ad7 100755 (executable)
@@ -254,7 +254,8 @@ prompt_for_bootmanager()
 # ask for Debian release {{{
 prompt_for_release()
 {
 # ask for Debian release {{{
 prompt_for_release()
 {
-  RELEASE="$(dialog --stdout --title "${PN}" --default-item lenny --menu \
+  [ -n "$RELEASE" ] && DEFAULT_RELEASE="$RELEASE" || DEFAULT_RELEASE='lenny'
+  RELEASE="$(dialog --stdout --title "${PN}" --default-item $DEFAULT_RELEASE --menu \
             "Please enter the Debian release you would like to use for installation:" \
             0 50 4 \
             etch     Debian/old-stable \
             "Please enter the Debian release you would like to use for installation:" \
             0 50 4 \
             etch     Debian/old-stable \
@@ -810,6 +811,8 @@ preparechroot() {
 
 # execute all scripts in /etc/debootstrap/scripts/ {{{
 execute_scripts() {
 
 # 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
    if [ -d "$_opt_scripts" ] || [ "$SCRIPTS" = 'yes' ] ; then
       [ -d "$_opt_scripts" ] && scripts="$_opt_scripts" || scripts="$CONFFILES/scripts/"
       for script in ${scripts}/* ; do