summaryrefslogtreecommitdiff
path: root/security/openssh
diff options
context:
space:
mode:
authorwiz <wiz>2003-05-22 09:05:38 +0000
committerwiz <wiz>2003-05-22 09:05:38 +0000
commit480a0d7ed6a34470bb52b765b334bfb4730d2fbc (patch)
tree1cc11f11d7b39765ecc884b1d805d2f938160a7a /security/openssh
parent3bbdde8f58e0229fd3d8a400fb60c279f6653bc2 (diff)
downloadpkgsrc-480a0d7ed6a34470bb52b765b334bfb4730d2fbc.tar.gz
Match v1.16 of rc.d/sshd:
Don't assume that $0 is this script. Remove a directory check since we check for a file in the directory anyway. Closes PR 21353 by Jeremy C. Reed.
Diffstat (limited to 'security/openssh')
-rw-r--r--security/openssh/files/sshd.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/security/openssh/files/sshd.sh b/security/openssh/files/sshd.sh
index aba871be2ee..f28b5f6473c 100644
--- a/security/openssh/files/sshd.sh
+++ b/security/openssh/files/sshd.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: sshd.sh,v 1.10 2002/09/20 02:02:00 grant Exp $
+# $NetBSD: sshd.sh,v 1.11 2003/05/22 09:05:38 wiz Exp $
#
# PROVIDE: sshd
# REQUIRE: DAEMON LOGIN
@@ -50,14 +50,19 @@ sshd_precmd()
if [ ! -f @PKG_SYSCONFDIR@/ssh_host_key -o \
! -f @PKG_SYSCONFDIR@/ssh_host_dsa_key -o \
! -f @PKG_SYSCONFDIR@/ssh_host_rsa_key ]; then
- $0 keygen
+ if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -f /etc/rc.d/DAEMON ]
+ then
+ run_rc_command keygen
+ else
+ eval ${keygen_cmd}
+ fi
fi
}
keygen_cmd=sshd_keygen
start_precmd=sshd_precmd
-if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]
+if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -f /etc/rc.d/DAEMON ]
then
load_rc_config $name
run_rc_command "$1"