From 6fd5cf97f5debb0b0d931612d6bad9f325d30129 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 21 Nov 2008 12:55:24 +0100 Subject: [PATCH] Fix check for chroot script directory --- chroot-script | 2 +- grml-debootstrap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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! -- 2.1.4