diff options
author | Roy Marples <uberlord@gentoo.org> | 2006-09-28 11:11:54 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2006-09-28 11:11:54 +0000 |
commit | d8c124e32d4e5e4f511cb1aff8ab0a428d7491db (patch) | |
tree | 5802923d9aaf55f653a9de6d143db26ad5d50f93 | |
parent | Fix ppp.sh, #149385 (diff) | |
download | baselayout-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-x | sbin/runscript.sh | 8 |
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} |