From: Michael Prokop Date: Fri, 21 Nov 2008 11:55:24 +0000 (+0100) Subject: Fix check for chroot script directory X-Git-Tag: v0.23~3 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=6fd5cf97f5debb0b0d931612d6bad9f325d30129 Fix check for chroot script directory --- diff --git a/chroot-script b/chroot-script index 072fb4c..e5ea8a3 100755 --- a/chroot-script +++ b/chroot-script @@ -340,7 +340,7 @@ hostname() { # listen on loopback interface only: sed -i "s/^inet_interfaces = .*/inet_interfaces = loopback-only/" /etc/postfix/main.cf - grep inet_interfaces /etc/postfix/main.cf || echo 'inet_interfaces = loopback-only' >> /etc/postfix/main.cf + grep -q inet_interfaces /etc/postfix/main.cf || echo 'inet_interfaces = loopback-only' >> /etc/postfix/main.cf fi fi } diff --git a/grml-debootstrap b/grml-debootstrap index 59ee6dd..c90b1b0 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -765,7 +765,7 @@ preparechroot() { # copy scripts that should be executed inside the chroot: _opt_chroot_scripts=${_opt_chroot_scripts:-$CONFFILES/chroot-scripts/} - [ -f $_opt_chroot_scripts -a "$CHROOT_SCRIPTS" = 'yes' ] && \ + [ -d $_opt_chroot_scripts -a "$CHROOT_SCRIPTS" = 'yes' ] && \ cp -a $VERBOSE $_opt_chroot_scripts $MNTPOINT/etc/debootstrap/ # notice: do NOT use $CHROOT_VARIABLES inside chroot but statically file instead!