diff options
author | root <root@rshg054.dnsready.net> | 2012-03-21 00:01:20 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-03-21 00:01:20 +0000 |
commit | a3108a9a809c496e1f6a0e9caf0acebac3889bfb (patch) | |
tree | df7be9bed47b2d4a4f0ae33d40a406a775a5d1e7 /testing/openssh/sshd.close-sessions | |
parent | 99136e3a2e9f6f07a7ff08d5721bce354b853c8b (diff) |
Wed Mar 21 00:01:20 UTC 2012
Diffstat (limited to 'testing/openssh/sshd.close-sessions')
-rw-r--r-- | testing/openssh/sshd.close-sessions | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testing/openssh/sshd.close-sessions b/testing/openssh/sshd.close-sessions new file mode 100644 index 000000000..208583238 --- /dev/null +++ b/testing/openssh/sshd.close-sessions @@ -0,0 +1,14 @@ +# Close sshd sessions before shutting down the network; see FS#17389. + +sshd_close_sessions () { + /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 + fi + done + stat_done +} + +add_hook shutdown_start sshd_close_sessions |