summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-09-28 11:11:54 +0000
committerRoy Marples <uberlord@gentoo.org>2006-09-28 11:11:54 +0000
commitd8c124e32d4e5e4f511cb1aff8ab0a428d7491db (patch)
tree5802923d9aaf55f653a9de6d143db26ad5d50f93
parentFix ppp.sh, #149385 (diff)
downloadbaselayout-d8c124e32d4e5e4f511cb1aff8ab0a428d7491db.tar.gz
baselayout-d8c124e32d4e5e4f511cb1aff8ab0a428d7491db.tar.bz2
baselayout-d8c124e32d4e5e4f511cb1aff8ab0a428d7491db.zip
Snapshot inactive services too when stopping from the background or restarting
svn path=/branches/baselayout-1_12/; revision=2290
-rwxr-xr-xsbin/runscript.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/runscript.sh b/sbin/runscript.sh
index f15251d5..2206f7ad 100755
--- a/sbin/runscript.sh
+++ b/sbin/runscript.sh
@@ -590,7 +590,8 @@ for arg in $* ; do
if [[ ${IN_BACKGROUND} == "true" ]] ; then
rm -rf "${svcdir}/snapshot/$$"
mkdir -p "${svcdir}/snapshot/$$"
- cp -pP "${svcdir}"/started/* "${svcdir}/snapshot/$$/"
+ cp -pP "${svcdir}"/started/* "${svcdir}"/inactive/* \
+ "${svcdir}/snapshot/$$/"
rm -f "${svcdir}/snapshot/$$/${SVCNAME}"
fi
@@ -628,14 +629,15 @@ for arg in $* ; do
restart)
svcrestart="yes"
- # We don't kill child processes if we're restarting
+ # We don't kill child processes if we're restarting
# This is especically important for sshd ....
RC_KILL_CHILDREN="no"
# Create a snapshot of started services
rm -rf "${svcdir}/snapshot/$$"
mkdir -p "${svcdir}/snapshot/$$"
- cp -pP "${svcdir}"/started/* "${svcdir}/snapshot/$$/"
+ cp -pP "${svcdir}"/started/* "${svcdir}"/inactive/* \
+ "${svcdir}/snapshot/$$/"
rm -f "${svcdir}/snapshot/$$/${SVCNAME}"
# Simple way to try and detect if the service use svc_{start,stop}