diff options
author | Matt Smith <mcs@darkregion.net> | 2011-03-31 04:24:08 -0500 |
---|---|---|
committer | Matt Smith <mcs@darkregion.net> | 2011-03-31 07:25:03 -0500 |
commit | bf17c7ead2d220d467c13420815aa19105e805ac (patch) | |
tree | 8a1834685fb24f11d27000e014170d85ae3c6f7d /main/openssh | |
parent | 7faef200060e1a0e2f098a349bf6c1ea9a7dcb5d (diff) | |
download | aports-bf17c7ead2d220d467c13420815aa19105e805ac.tar.bz2 aports-bf17c7ead2d220d467c13420815aa19105e805ac.tar.xz |
main/openssh: drop connections on reboot/halt
Diffstat (limited to 'main/openssh')
-rw-r--r-- | main/openssh/APKBUILD | 4 | ||||
-rw-r--r-- | main/openssh/sshd.initd | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/main/openssh/APKBUILD b/main/openssh/APKBUILD index 8741c511f..c72ab84e7 100644 --- a/main/openssh/APKBUILD +++ b/main/openssh/APKBUILD @@ -2,7 +2,7 @@ pkgname=openssh pkgver=5.8_p1 _myver=${pkgver%_*}${pkgver#*_} -pkgrel=1 +pkgrel=2 pkgdesc="Port of OpenBSD's free SSH release" url="http://www.openssh.org/portable.html" arch="all" @@ -88,5 +88,5 @@ client() { md5sums="86f5e1c23b4c4845f23b9b7b493fb53d openssh-5.8p1.tar.gz 4c96723cb6dd02f76fe263c4d68c6a6f openssh5.8-dynwindow_noneswitch.diff.gz 578fb646bab2d312172ec716970031b1 openssh5.8-peaktput.diff -e36e847812214822044b6d3e0027d3fc sshd.initd +dda71d60ff5b4fbb61ad99fe83de6bc3 sshd.initd b35e9f3829f4cfca07168fcba98749c7 sshd.confd" diff --git a/main/openssh/sshd.initd b/main/openssh/sshd.initd index d1e6e16d4..912d435c9 100644 --- a/main/openssh/sshd.initd +++ b/main/openssh/sshd.initd @@ -74,6 +74,13 @@ stop() { start-stop-daemon --stop --exec "${SSHD_BINARY}" \ --pidfile "${SSHD_PIDFILE}" --quiet eend $? + + if [ "$RC_RUNLEVEL" = "shutdown" ]; then + ebegin "Shutting down ssh connections" + _sshd_pids=$(pgrep "${SSHD_BINARY##*/}: .* \[priv]") + kill -TERM $_sshd_pids 2>&1 >/dev/null + eend 0 + fi } reload() { |