X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=3cd219608f806944f75fb7510ca5b7176eab6df7;hp=9e1437f28207573a976011457c4c1ee8e4113de8;hb=41260b2bb817765667a4d816d56306574f5ca691;hpb=12bcb2d7ae0cae32a05498a1599a95d36693eb3c diff --git a/chroot-script b/chroot-script old mode 100644 new mode 100755 index 9e1437f..3cd2196 --- 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 23 12:02:03 CEST 2007 [mika] +# Latest change: Sam Apr 28 20:19:58 CEST 2007 [mika] ################################################################################ set -e # exit on any error @@ -45,8 +45,13 @@ stage() { # define chroot mirror {{{ chrootmirror() { - if [ -n "$CHROOTMIRROR" ] ; then - echo "deb $CHROOTMIRROR $RELEASE main contrib non-free" > /etc/apt/sources.list + if [ -n "$ISO" ] ; then + echo "deb $ISO $RELEASE main contrib" > /etc/apt/sources.list + [ -n "$CHROOTMIRROR" ] && echo "deb $CHROOTMIRROR $RELEASE main contrib non-free" >> /etc/apt/sources.list + else + if [ -n "$CHROOTMIRROR" ] ; then + echo "deb $CHROOTMIRROR $RELEASE main contrib non-free" > /etc/apt/sources.list + fi fi } # }}} @@ -398,7 +403,9 @@ grub() { # make sure we don't have any running processes left {{{ services() { for service in ssh mdadm mdadm-raid ; do - [ -x "/etc/init.d/$service" ] && "/etc/init.d/$service" stop + if [ -x /etc/init.d/"$service" ] ; then + /etc/init.d/"$service" stop || /bin/true + fi done } # }}}