summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2002-07-16 14:24:38 -0700
committerTim Rice <tim@multitalents.net>2002-07-16 14:24:38 -0700
commitffaf4453712ac7b47b0157ba2c7201e77a54c369 (patch)
treebbfcbadb8ebbb6f54210b22a6342701da1848b09
parent104c3feb6999556db85283a8ba7ac1f8c38b5609 (diff)
[contrib/solaris/opensshd.in] Only kill sshd if .pid file found
-rw-r--r--ChangeLog5
-rwxr-xr-xcontrib/solaris/opensshd.in12
2 files changed, 5 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b0b61a26..039f1a8f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
120020716
2 - (tim) [contrib/solaris/opensshd.in] Only kill sshd if .pid file found
3
120020715 420020715
2 - (bal) OpenBSD CVS Sync 5 - (bal) OpenBSD CVS Sync
3 - itojun@cvs.openbsd.org 2002/07/12 13:29:09 6 - itojun@cvs.openbsd.org 2002/07/12 13:29:09
@@ -1374,4 +1377,4 @@
1374 - (stevesk) entropy.c: typo in debug message 1377 - (stevesk) entropy.c: typo in debug message
1375 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 1378 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
1376 1379
1377$Id: ChangeLog,v 1.2370 2002/07/15 18:49:20 mouring Exp $ 1380$Id: ChangeLog,v 1.2371 2002/07/16 21:24:38 tim Exp $
diff --git a/contrib/solaris/opensshd.in b/contrib/solaris/opensshd.in
index 212254dc8..e7ca2489f 100755
--- a/contrib/solaris/opensshd.in
+++ b/contrib/solaris/opensshd.in
@@ -3,11 +3,8 @@
3# 3#
4# Stripped PRNGd out of it for the time being. 4# Stripped PRNGd out of it for the time being.
5 5
6AWK=/usr/bin/awk
7CAT=/usr/bin/cat 6CAT=/usr/bin/cat
8KILL=/usr/bin/kill 7KILL=/usr/bin/kill
9PS=/usr/bin/ps
10XARGS=/usr/bin/xargs
11 8
12prefix=%%openSSHDir%% 9prefix=%%openSSHDir%%
13etcdir=%%configDir%% 10etcdir=%%configDir%%
@@ -20,12 +17,6 @@ HOST_KEY_RSA1=$etcdir/ssh_host_key
20HOST_KEY_DSA=$etcdir/ssh_host_dsa_key 17HOST_KEY_DSA=$etcdir/ssh_host_dsa_key
21HOST_KEY_RSA=$etcdir/ssh_host_rsa_key 18HOST_KEY_RSA=$etcdir/ssh_host_rsa_key
22 19
23killproc() {
24 _procname=$1
25 _signal=$2
26 ${PS} -u root | ${AWK} '/'"$_procname"'$/ {print $1}' | ${XARGS} ${KILL}
27}
28
29 20
30checkkeys() { 21checkkeys() {
31 if [ ! -f $HOST_KEY_RSA1 ]; then 22 if [ ! -f $HOST_KEY_RSA1 ]; then
@@ -46,8 +37,7 @@ stop_service() {
46 if [ ${PID:=0} -gt 1 -a ! "X$PID" = "X " ]; then 37 if [ ${PID:=0} -gt 1 -a ! "X$PID" = "X " ]; then
47 ${KILL} ${PID} 38 ${KILL} ${PID}
48 else 39 else
49 echo "Unable to read PID file, killing using alternate method" 40 echo "Unable to read PID file"
50 killproc sshd TERM
51 fi 41 fi
52} 42}
53 43