X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=7753bdb96377c056757c93750b4e0fa666e538c1;hp=40646fa117c0509675d5ab47a61eaaf0c55616f3;hb=06e9a24632a9cabaefde8fc478b1f52afecd6b06;hpb=bd35f4be8bcd23fdc58682a92622c5928dbc0114 diff --git a/chroot-script b/chroot-script index 40646fa..7753bdb 100644 --- a/chroot-script +++ b/chroot-script @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Mon Apr 16 12:21:19 CEST 2007 [mika] +# Latest change: Mon Apr 16 14:48:41 CEST 2007 [mika] ################################################################################ set -e # exit on any error @@ -32,12 +32,12 @@ fi # helper functions {{{ stage() { - if grep -q done "$STAGES/$1" 2>/dev/null ; then - echo " * Notice: stage $1 has been executed already, skipping execution therefore." - return 1 - else + if [ -n "$2" ] ; then 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 + return 1 fi } # }}} @@ -89,7 +89,7 @@ packages() { exit 1 else $APTUPDATE - $APT $(cat /etc/debootstrap/packages) $GRMLPACKAGES + $APTINSTALL $(cat /etc/debootstrap/packages) $GRMLPACKAGES fi fi }