X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=a08262acb4b5fd9cd8a69d556a06111f27f86f3d;hp=2e419a8f64395567f083d44f3af6fe87ce93f4f4;hb=b8e833aa58b68b6fac29ca2256096495c135e034;hpb=fa164cea7481233fb376f1a3bb8ba56475f5228c diff --git a/grml-debootstrap b/grml-debootstrap index 2e419a8..a08262a 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -11,7 +11,7 @@ set -e # exit on any error # variables {{{ PN="$(basename $0)" -VERSION='0.24' +VERSION='0.27' MNTPOINT="/mnt/debootstrap.$$" # inside the chroot system locales might not be available, so use minimum: @@ -177,7 +177,7 @@ prompt_for_target() AVAILABLE_PARTITIONS=$(LANG=C fdisk -l 2>/dev/null | \ sed 's/*//' | \ grep -v 'Extended$' | \ - gawk -v num=0 -v ORS=' ' '/^\/dev\// {print $1}') + gawk -v num=0 -v ORS=' ' '/^\/dev\// {print $1}'; echo /dev/md*); if [ -z "$AVAILABLE_PARTITIONS" ] ; then dialog --title "$PN" --trim \ @@ -254,7 +254,8 @@ prompt_for_bootmanager() # 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 \ @@ -810,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