diff options
Diffstat (limited to 'testing/openssh/sshd.close-sessions')
-rw-r--r-- | testing/openssh/sshd.close-sessions | 9 |
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 } |