# variables {{{
PN="$(basename $0)"
-VERSION='0.34'
+VERSION='0.35'
MNTPOINT="/mnt/debootstrap.$$"
# inside the chroot system locales might not be available, so use minimum:
-d, --confdir <path> Place of config files for debootstrap, defaults
to /etc/debootstrap
--packages <file> Install packages defined in specified list file.
+ --nopackages Skip installation of packages defined in
+ /etc/debootstrap/packages
--debconf <file> Pre-seed packages using specified pre-seed db file.
--keep_src_list Do not overwrite user provided apt sources.list.
--hostname <name> Hostname of Debian system.
[ "$_opt_interactive" ] && INTERACTIVE=1
[ "$_opt_config" ] && CONFIGFILE=$_opt_config
[ "$_opt_packages_set" ] && PACKAGES='yes'
+[ "$_opt_nopackages" ] && PACKAGES=''
[ "$_opt_debconf_set" ] && DEBCONF='yes'
[ "$_opt_scripts_set" ] && SCRIPTS='yes'
[ "$_opt_pre_scripts_set" ] && PRE_SCRIPTS='yes'
[ -n "$ROOTPASSWORD" ] && echo "ROOTPASSWORD=$ROOTPASSWORD" >> $CHROOT_VARIABLES
[ -n "$TARGET" ] && echo "TARGET=$TARGET" >> $CHROOT_VARIABLES
[ -n "$TARGET_UUID" ] && echo "TARGET_UUID=$TARGET_UUID" >> $CHROOT_VARIABLES
+ [ -n "$RM_APTCACHE" ] && echo "RM_APTCACHE=$RM_APTCACHE" >> $CHROOT_VARIABLES
cp $VERBOSE $CONFFILES/chroot-script $MNTPOINT/bin/chroot-script
chmod 755 $MNTPOINT/bin/chroot-script
# }}}
# finalize {{{
+if [ -n "$ISODIR" ] ; then
+ einfo "Unmounting Debian image loopback from $MNTPOINT/$ISODIR."
+ umount "$MNTPOINT/$ISODIR"
+ eend $?
+fi
+
einfo "Removing ${CHROOT_VARIABLES}" ; rm "$CHROOT_VARIABLES" ; eend $?
einfo "Removing ${STAGES}" ; rmdir "$STAGES" ; eend $?