From 5e0317281cc3ed5abad668643843ca346a827ad8 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sat, 28 Apr 2007 20:20:28 +0200 Subject: [PATCH] Make sure stopping a service inside chroot-script does not fail chroot-script itself --- chroot-script | 6 ++++-- debian/changelog | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/chroot-script b/chroot-script index 9e1437f..caafeaf 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 23 12:02:03 CEST 2007 [mika] +# Latest change: Sam Apr 28 20:19:58 CEST 2007 [mika] ################################################################################ set -e # exit on any error @@ -398,7 +398,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 } # }}} diff --git a/debian/changelog b/debian/changelog index cbe968c..8a52661 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ grml-debootstrap (0.9) unstable; urgency=low * Activate zsh completion. * Rewrote interfaces() code for handling of /etc/network/interfaces. Thanks for the pointer, formorer. + * Make sure stopping a service inside chroot-script does not + fail chroot-script itself. -- Michael Prokop Mon, 23 Apr 2007 00:23:19 +0200 -- 2.1.4