mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-26 03:42:07 +00:00
[contrib/solaris/opensshd.in] Only kill sshd if .pid file found
This commit is contained in:
parent
104c3feb69
commit
ffaf445371
@ -1,3 +1,6 @@
|
||||
20020716
|
||||
- (tim) [contrib/solaris/opensshd.in] Only kill sshd if .pid file found
|
||||
|
||||
20020715
|
||||
- (bal) OpenBSD CVS Sync
|
||||
- itojun@cvs.openbsd.org 2002/07/12 13:29:09
|
||||
@ -1374,4 +1377,4 @@
|
||||
- (stevesk) entropy.c: typo in debug message
|
||||
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
|
||||
|
||||
$Id: ChangeLog,v 1.2370 2002/07/15 18:49:20 mouring Exp $
|
||||
$Id: ChangeLog,v 1.2371 2002/07/16 21:24:38 tim Exp $
|
||||
|
@ -3,11 +3,8 @@
|
||||
#
|
||||
# Stripped PRNGd out of it for the time being.
|
||||
|
||||
AWK=/usr/bin/awk
|
||||
CAT=/usr/bin/cat
|
||||
KILL=/usr/bin/kill
|
||||
PS=/usr/bin/ps
|
||||
XARGS=/usr/bin/xargs
|
||||
|
||||
prefix=%%openSSHDir%%
|
||||
etcdir=%%configDir%%
|
||||
@ -20,12 +17,6 @@ HOST_KEY_RSA1=$etcdir/ssh_host_key
|
||||
HOST_KEY_DSA=$etcdir/ssh_host_dsa_key
|
||||
HOST_KEY_RSA=$etcdir/ssh_host_rsa_key
|
||||
|
||||
killproc() {
|
||||
_procname=$1
|
||||
_signal=$2
|
||||
${PS} -u root | ${AWK} '/'"$_procname"'$/ {print $1}' | ${XARGS} ${KILL}
|
||||
}
|
||||
|
||||
|
||||
checkkeys() {
|
||||
if [ ! -f $HOST_KEY_RSA1 ]; then
|
||||
@ -46,8 +37,7 @@ stop_service() {
|
||||
if [ ${PID:=0} -gt 1 -a ! "X$PID" = "X " ]; then
|
||||
${KILL} ${PID}
|
||||
else
|
||||
echo "Unable to read PID file, killing using alternate method"
|
||||
killproc sshd TERM
|
||||
echo "Unable to read PID file"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user