From 53e9974007661fe4026a9512ae1a7e1ea43face8 Mon Sep 17 00:00:00 2001 From: Tim Rice Date: Fri, 20 Nov 2009 19:32:15 -0800 Subject: [PATCH] - (tim) [opensshd.init.in] If PidFile is set in sshd_config, use it. Bug 1628. OK dtucker@ --- ChangeLog | 4 ++++ opensshd.init.in | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index e477a8fc3..41c272ec9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +20091121 + - (tim) [opensshd.init.in] If PidFile is set in sshd_config, use it. + Bug 1628. OK dtucker@ + 20091120 - (djm) [ssh-rand-helper.c] Print error and usage() when passed command- line arguments as none are supported. Exit when passed unrecognised diff --git a/opensshd.init.in b/opensshd.init.in index c36c5c88a..d0aff7794 100755 --- a/opensshd.init.in +++ b/opensshd.init.in @@ -14,6 +14,8 @@ piddir=@piddir@ SSHD=$prefix/sbin/sshd PIDFILE=$piddir/sshd.pid +PidFile=`grep "^PidFile" ${sysconfdir}/sshd_config | tr "=" " " | awk '{print $2}'` +[ X$PidFile = X ] || PIDFILE=$PidFile SSH_KEYGEN=$prefix/bin/ssh-keygen HOST_KEY_RSA1=$sysconfdir/ssh_host_key HOST_KEY_DSA=$sysconfdir/ssh_host_dsa_key