MNTPOINT="/mnt/debootstrap.$$"
# inside the chroot system locales might not be available, so use minimum:
MNTPOINT="/mnt/debootstrap.$$"
# inside the chroot system locales might not be available, so use minimum:
--nodebootstrap Skip debootstrap, only do configuration to the target.
--grub <device> Target for grub installation. Usage example: /dev/sda
--arch <arch> Architecture to use. Currently only i386 is supported.
--nodebootstrap Skip debootstrap, only do configuration to the target.
--grub <device> Target for grub installation. Usage example: /dev/sda
--arch <arch> Architecture to use. Currently only i386 is supported.
-d, --confdir <path> Place of config files for debootstrap, defaults
to /etc/debootstrap
--packages <file> Install packages defined in specified list file.
-d, --confdir <path> Place of config files for debootstrap, defaults
to /etc/debootstrap
--packages <file> Install packages defined in specified list file.
--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.
--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_debopt" ] && DEBOOTSTRAP_OPT=$_opt_debopt
[ "$_opt_interactive" ] && INTERACTIVE=1
[ "$_opt_config" ] && CONFIGFILE=$_opt_config
[ "$_opt_debopt" ] && DEBOOTSTRAP_OPT=$_opt_debopt
[ "$_opt_interactive" ] && INTERACTIVE=1
[ "$_opt_config" ] && CONFIGFILE=$_opt_config
[ "$_opt_packages_set" ] && PACKAGES='yes'
[ "$_opt_nopackages" ] && PACKAGES=''
[ "$_opt_debconf_set" ] && DEBCONF='yes'
[ "$_opt_packages_set" ] && PACKAGES='yes'
[ "$_opt_nopackages" ] && PACKAGES=''
[ "$_opt_debconf_set" ] && DEBCONF='yes'
gawk -v num=0 -v ORS=' ' '/^\/dev\// {print $1}')
[ -n "$AVAILABLE_PARTITIONS" ] || echo "FIXME: no partitions available?"
PARTITION_LIST=$(for i in $(echo $AVAILABLE_PARTITIONS) ; do
gawk -v num=0 -v ORS=' ' '/^\/dev\// {print $1}')
[ -n "$AVAILABLE_PARTITIONS" ] || echo "FIXME: no partitions available?"
PARTITION_LIST=$(for i in $(echo $AVAILABLE_PARTITIONS) ; do
# make sure nothing is left inside chroot so we can unmount it
[ -x "$MNTPOINT"/etc/init.d/ssh ] && "$MNTPOINT"/etc/init.d/ssh stop
[ -x "$MNTPOINT"/etc/init.d/mdadm ] && "$MNTPOINT"/etc/init.d/mdadm stop
# make sure nothing is left inside chroot so we can unmount it
[ -x "$MNTPOINT"/etc/init.d/ssh ] && "$MNTPOINT"/etc/init.d/ssh stop
[ -x "$MNTPOINT"/etc/init.d/mdadm ] && "$MNTPOINT"/etc/init.d/mdadm stop
if [ -n "$DIRECTORY" ] ; then
einfo "Not unmounting $MNTPOINT as you requested me to install into a directory of your own choice." ; eend 0
else
if [ -n "$DIRECTORY" ] ; then
einfo "Not unmounting $MNTPOINT as you requested me to install into a directory of your own choice." ; eend 0
else
einfo "Removing ${CHROOT_VARIABLES}" ; rm "$CHROOT_VARIABLES" ; eend $?
einfo "Removing ${STAGES}" ; rmdir "$STAGES" ; eend $?
einfo "Removing ${CHROOT_VARIABLES}" ; rm "$CHROOT_VARIABLES" ; eend $?
einfo "Removing ${STAGES}" ; rmdir "$STAGES" ; eend $?