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:
{
HOSTNAME="$(dialog --stdout --title "${PN}" --inputbox \
"Please enter the hostname you would like to use for installation:" \
{
HOSTNAME="$(dialog --stdout --title "${PN}" --inputbox \
"Please enter the hostname you would like to use for installation:" \
{
MIRROR="$(dialog --stdout --title "${PN}" --inputbox \
"Please enter Debian mirror you would like to use for installing packages." \
{
MIRROR="$(dialog --stdout --title "${PN}" --inputbox \
"Please enter Debian mirror you would like to use for installing packages." \
[ -n "$HOSTNAME" ] && echo "HOSTNAME=$HOSTNAME" >> $CHROOT_VARIABLES
[ -n "$ISODIR" ] && echo "ISODIR=$ISO" >> $CHROOT_VARIABLES
[ -n "$ISO" ] && echo "ISO=$ISO" >> $CHROOT_VARIABLES
[ -n "$HOSTNAME" ] && echo "HOSTNAME=$HOSTNAME" >> $CHROOT_VARIABLES
[ -n "$ISODIR" ] && echo "ISODIR=$ISO" >> $CHROOT_VARIABLES
[ -n "$ISO" ] && echo "ISO=$ISO" >> $CHROOT_VARIABLES
[ -n "$MIRROR" ] && echo "MIRROR=$MIRROR" >> $CHROOT_VARIABLES
[ -n "$KEEP_SRC_LIST" ] && echo "KEEP_SRC_LIST=$KEEP_SRC_LIST" >> $CHROOT_VARIABLES
[ -n "$PACKAGES" ] && echo "PACKAGES=$PACKAGES" >> $CHROOT_VARIABLES
[ -n "$MIRROR" ] && echo "MIRROR=$MIRROR" >> $CHROOT_VARIABLES
[ -n "$KEEP_SRC_LIST" ] && echo "KEEP_SRC_LIST=$KEEP_SRC_LIST" >> $CHROOT_VARIABLES
[ -n "$PACKAGES" ] && echo "PACKAGES=$PACKAGES" >> $CHROOT_VARIABLES
# copy scripts that should be executed inside the chroot:
_opt_chroot_scripts=${_opt_chroot_scripts:-$CONFFILES/chroot-scripts/}
# copy scripts that should be executed inside the chroot:
_opt_chroot_scripts=${_opt_chroot_scripts:-$CONFFILES/chroot-scripts/}
- [ -d $_opt_chroot_scripts -a "$CHROOT_SCRIPTS" = 'yes' ] && \
- cp -a $VERBOSE $_opt_chroot_scripts $MNTPOINT/etc/debootstrap/
+ [ -d $_opt_chroot_scripts -a "$CHROOT_SCRIPTS" = 'yes' ] && {
+ mkdir -p $MNTPOINT/etc/debootstrap/chroot-scripts
+ cp -a $VERBOSE $_opt_chroot_scripts/* $MNTPOINT/etc/debootstrap/chroot-scripts/
+ }
# notice: do NOT use $CHROOT_VARIABLES inside chroot but statically file instead!
cp $VERBOSE $CHROOT_VARIABLES $MNTPOINT/etc/debootstrap/variables
# notice: do NOT use $CHROOT_VARIABLES inside chroot but statically file instead!
cp $VERBOSE $CHROOT_VARIABLES $MNTPOINT/etc/debootstrap/variables
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