diff options
author | wiz <wiz@pkgsrc.org> | 2003-05-22 09:05:38 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2003-05-22 09:05:38 +0000 |
commit | 105157900a50acf819bee4c1d6ac85ac5b993e8e (patch) | |
tree | 1cc11f11d7b39765ecc884b1d805d2f938160a7a /security | |
parent | b614a704b7b1866bd247478d89070b877313e503 (diff) | |
download | pkgsrc-105157900a50acf819bee4c1d6ac85ac5b993e8e.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')
-rw-r--r-- | security/openssh/files/sshd.sh | 11 |
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" |