aboutsummaryrefslogtreecommitdiffstats
path: root/main/openssh
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-03-16 07:59:54 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-03-16 07:59:54 +0000
commitae99c382f78b1582b1528c2ce03570605c845503 (patch)
treec675caefb36a16edcb88db14b518c5627e0529bc /main/openssh
parentfbf7423a6bbdc6b1505c9f62d10ed2190979c0cf (diff)
downloadaports-ae99c382f78b1582b1528c2ce03570605c845503.tar.bz2
aports-ae99c382f78b1582b1528c2ce03570605c845503.tar.xz
main/openssh: kill current ssh sessions on stop
Diffstat (limited to 'main/openssh')
-rw-r--r--main/openssh/APKBUILD4
-rw-r--r--main/openssh/sshd.initd10
2 files changed, 11 insertions, 3 deletions
diff --git a/main/openssh/APKBUILD b/main/openssh/APKBUILD
index 87d996e974..bbc0d164cb 100644
--- a/main/openssh/APKBUILD
+++ b/main/openssh/APKBUILD
@@ -2,7 +2,7 @@
pkgname=openssh
pkgver=5.4_p1
_myver=${pkgver%_*}${pkgver#*_}
-pkgrel=0
+pkgrel=1
pkgdesc="Port of OpenBSD's free SSH release"
url="http://www.openssh.org/portable.html"
license="as-is"
@@ -63,5 +63,5 @@ client() {
}
md5sums="da10af8a789fa2e83e3635f3a1b76f5e openssh-5.4p1.tar.gz
-d993cc91e9fab6c6012390874c28af0a sshd.initd
+e11f44a4c47135484ac750d52855f846 sshd.initd
b35e9f3829f4cfca07168fcba98749c7 sshd.confd"
diff --git a/main/openssh/sshd.initd b/main/openssh/sshd.initd
index 34852c4e31..149b0ecef6 100644
--- a/main/openssh/sshd.initd
+++ b/main/openssh/sshd.initd
@@ -63,6 +63,7 @@ start() {
}
stop() {
+ local rc=
if [ "${RC_CMD}" = "restart" ] ; then
checkconfig || return 1
fi
@@ -70,7 +71,14 @@ stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --exec "${SSHD_BINARY}" \
--pidfile "${SSHD_PIDFILE}" --quiet
- eend $?
+ rc=$?
+ eend $rc
+
+ if [ "${RC_CMD}" = "stop" ]; then
+ # kill sessions on shutdown but not on restart
+ killall -q sshd &
+ fi
+ return $rc
}
reload() {