From 6276d4b58208dc5623d4b27441ca9e5a75210413 Mon Sep 17 00:00:00 2001 From: Tong Sun Date: Mon, 24 Nov 2008 17:51:59 -0500 Subject: [PATCH 1/1] ensure --chroot-scripts always works Make sure --chroot-scripts still works if its path does not end with /chroot-scripts. no sure it is necessary though. --- grml-debootstrap | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/grml-debootstrap b/grml-debootstrap index 69f2cf0..245f0d8 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -765,8 +765,10 @@ preparechroot() { # 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 -- 2.1.4