aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-10-21 09:22:55 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-10-21 09:22:55 +0000
commit4a7fde37aaf32ca55527bd2b0207c617b3996c4b (patch)
tree3b8509e98cdedb7a01afaf7644979bcca3d86761
parent324acb3452a5bfa16e711ef0b22be938f2c8cba8 (diff)
downloadaports-4a7fde37aaf32ca55527bd2b0207c617b3996c4b.tar.bz2
aports-4a7fde37aaf32ca55527bd2b0207c617b3996c4b.tar.xz
main/openssh: do not try kill nonexisting sshd session on shutdown
Fixes the error message on shutdown: sh: you need to specify whom to kill
-rw-r--r--main/openssh/APKBUILD4
-rw-r--r--main/openssh/sshd.initd4
2 files changed, 5 insertions, 3 deletions
diff --git a/main/openssh/APKBUILD b/main/openssh/APKBUILD
index db7525de45..6398fb21f8 100644
--- a/main/openssh/APKBUILD
+++ b/main/openssh/APKBUILD
@@ -2,7 +2,7 @@
pkgname=openssh
pkgver=5.8_p2
_myver=${pkgver%_*}${pkgver#*_}
-pkgrel=1
+pkgrel=2
pkgdesc="Port of OpenBSD's free SSH release"
url="http://www.openssh.org/portable.html"
arch="all"
@@ -89,5 +89,5 @@ client() {
md5sums="88a4a83b0e0e60cd545430d4e4bd7e0c openssh-5.8p2.tar.gz
4c96723cb6dd02f76fe263c4d68c6a6f openssh5.8-dynwindow_noneswitch.diff.gz
578fb646bab2d312172ec716970031b1 openssh5.8-peaktput.diff
-dda71d60ff5b4fbb61ad99fe83de6bc3 sshd.initd
+b35a2df5e951c3d315055332b6572352 sshd.initd
b35e9f3829f4cfca07168fcba98749c7 sshd.confd"
diff --git a/main/openssh/sshd.initd b/main/openssh/sshd.initd
index 912d435c99..35430c5e42 100644
--- a/main/openssh/sshd.initd
+++ b/main/openssh/sshd.initd
@@ -78,7 +78,9 @@ stop() {
if [ "$RC_RUNLEVEL" = "shutdown" ]; then
ebegin "Shutting down ssh connections"
_sshd_pids=$(pgrep "${SSHD_BINARY##*/}: .* \[priv]")
- kill -TERM $_sshd_pids 2>&1 >/dev/null
+ if [ -n "$_sshd_pids" ]; then
+ kill -TERM $_sshd_pids >/dev/null 2>&1
+ fi
eend 0
fi
}