summaryrefslogtreecommitdiff
path: root/testing/openssh/sshd.close-sessions
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-03-22 00:01:28 +0000
committerroot <root@rshg054.dnsready.net>2012-03-22 00:01:28 +0000
commit39e662ccfbe62ae77d458159d192816171a22f43 (patch)
tree2484a55934cd77dd33597ab2f214de5b7326cf69 /testing/openssh/sshd.close-sessions
parenta3108a9a809c496e1f6a0e9caf0acebac3889bfb (diff)
Thu Mar 22 00:01:28 UTC 2012
Diffstat (limited to 'testing/openssh/sshd.close-sessions')
-rw-r--r--testing/openssh/sshd.close-sessions9
1 files changed, 6 insertions, 3 deletions
diff --git a/testing/openssh/sshd.close-sessions b/testing/openssh/sshd.close-sessions
index 208583238..be2a709fc 100644
--- a/testing/openssh/sshd.close-sessions
+++ b/testing/openssh/sshd.close-sessions
@@ -1,13 +1,16 @@
# Close sshd sessions before shutting down the network; see FS#17389.
sshd_close_sessions () {
+ if ck_daemon sshd; then
+ return
+ fi
/etc/rc.d/sshd stop
stat_busy "Stopping Secure Shell Sessions"
for i in $(pgrep sshd); do
- if readlink -q /proc/$i/exe &>/dev/null | grep -q '^/usr/sbin/sshd'; then
- kill $i &>/dev/null
+ if readlink -q /proc/$i/exe | grep -q '^/usr/sbin/sshd'; then
+ kill $i
fi
- done
+ done &>/dev/null
stat_done
}