Use DEBIAN_FRONTEND inside APTINSTALL as well
[grml-debootstrap.git] / chroot-script
index 5bfcb44..0293940 100644 (file)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Mon Apr 16 14:48:41 CEST 2007 [mika]
+# Latest change: Mon Apr 16 15:26:11 CEST 2007 [mika]
 ################################################################################
 
 set -e # exit on any error
@@ -16,10 +16,10 @@ set -e # exit on any error
 
 # use aptitude only if it's available
 if [ -x /usr/bin/aptitude ] ; then
-   APTINSTALL='aptitude -y install '
+   APTINSTALL='DEBIAN_FRONTEND=$DEBIAN_FRONTEND aptitude -y install '
    APTUPDATE='aptitude update'
 else
-   APTINSTALL='apt-get --force-yes -y install'
+   APTINSTALL='DEBIAN_FRONTEND=$DEBIAN_FRONTEND apt-get --force-yes -y install'
    APTUPDATE='apt-get update'
 fi
 
@@ -36,7 +36,7 @@ stage() {
      echo "$2" > "$STAGES/$1"
      return 0
   elif grep -q done "$STAGES/$1" 2>/dev/null ; then
-     ewarn "Notice: stage $1 has been executed already, skipping execution therefore." ; eend 0
+     echo "Notice: stage $1 has been executed already, skipping execution therefore.">&2
      return 1
   fi
 }