diff options
author | James Meyer <james.meyer@operamail.com> | 2012-08-07 17:48:41 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-08-07 17:48:41 (GMT) |
commit | 3db4697296afcefb5b9d5d4b8acc462466192ab5 (patch) | |
tree | cc89cb07cb8d3189a8172a5f3dc3030f7374c8bf /abs/core/openssh/sshd.close-sessions | |
parent | df0abbd835cdc168cba9da94c72121f39232ce8a (diff) | |
download | linhes_pkgbuild-3db4697296afcefb5b9d5d4b8acc462466192ab5.zip linhes_pkgbuild-3db4697296afcefb5b9d5d4b8acc462466192ab5.tar.gz linhes_pkgbuild-3db4697296afcefb5b9d5d4b8acc462466192ab5.tar.bz2 |
openssh: 6.0p1
Diffstat (limited to 'abs/core/openssh/sshd.close-sessions')
-rw-r--r-- | abs/core/openssh/sshd.close-sessions | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/abs/core/openssh/sshd.close-sessions b/abs/core/openssh/sshd.close-sessions new file mode 100644 index 0000000..be2a709 --- /dev/null +++ b/abs/core/openssh/sshd.close-sessions @@ -0,0 +1,17 @@ +# 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 | grep -q '^/usr/sbin/sshd'; then + kill $i + fi + done &>/dev/null + stat_done +} + +add_hook shutdown_start sshd_close_sessions |