From: Tong Sun Date: Fri, 17 Oct 2008 02:20:54 +0000 (-0400) Subject: Fully implement the optional parameters X-Git-Tag: v0.23~17^2~9 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=d1fc804c38437709b79625b8275b5b326c81f332;hp=8da33a678bf4971408f2b79f02ccf543009083da Fully implement the optional parameters I.e., the optional parameters of --packages[=f] & --debconf[=f] --- diff --git a/grml-debootstrap b/grml-debootstrap index cc19118..0805aef 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -720,9 +720,11 @@ preparechroot() { sed -i "s#GRUB=.*#GRUB=\"$GRUB\"#" $MNTPOINT/etc/debootstrap/config sed -i "s#GROOT=.*#GROOT=\"$GROOT\"#" $MNTPOINT/etc/debootstrap/config - cp /etc/debootstrap/packages $MNTPOINT/etc/debootstrap/packages - [ -f /etc/debootstrap/debconf-selections -a "$DEBCONF" = 'yes' ] && \ - cp /etc/debootstrap/debconf-selections $MNTPOINT/etc/debootstrap/ + cp ${_opt_packages:-/etc/debootstrap/packages} \ + $MNTPOINT/etc/debootstrap/packages + _opt_debconf=${_opt_debconf:-/etc/debootstrap/debconf-selections} + [ -f $_opt_debconf -a "$DEBCONF" = 'yes' ] && \ + cp $_opt_debconf $MNTPOINT/etc/debootstrap/debconf-selections # notice: do NOT use $CHROOT_VARIABLES inside chroot but statically file instead! cp $CHROOT_VARIABLES $MNTPOINT/etc/debootstrap/variables