# 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
# provide system's /etc/hosts to the target:
if ! [ -f "$MNTPOINT/etc/hosts" ] ; then
cp $VERBOSE /etc/hosts $MNTPOINT/etc/hosts
- sed -i "s#127.0.0.1 .*#127.0.0.1 localhost $HOSTNAME#" /etc/hosts
fi
# setup default locales