From 4a7fde37aaf32ca55527bd2b0207c617b3996c4b Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 21 Oct 2011 09:22:55 +0000 Subject: 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 --- main/openssh/APKBUILD | 4 ++-- main/openssh/sshd.initd | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'main/openssh') 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 } -- cgit v1.2.3