Change name of precmd from start_precmd to sshd_precmd. While it worked
fine as was, the result was the line `start_precmd=start_precmd' which looked odd. Pointed out by Bernd Ernesti. While here, add NetBSD RCS Id. BTW, to clarify, as people have asked: this script does not support pkgsrc/security/sshd -- that package comes with a perfectly fine rc script which in addition to supporting /etc/rc.d can also be used with 1.4.X. This script will not trivially work with the ssh package as it a.) calls the ssh commands at the pathnames they will be installed at by usr.bin/ssh, and b.) generates a DSA key as well as an RSA key.
This commit is contained in:
parent
8d6c85d001
commit
d6662ec62f
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: sshd,v 1.5 2000/08/01 14:28:32 jwise Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: ssh
|
||||
# REQUIRE: NETWORK
|
||||
@ -32,7 +34,7 @@ sshd_keygen() {
|
||||
fi
|
||||
}
|
||||
|
||||
start_precmd() {
|
||||
sshd_precmd() {
|
||||
if [ ! -f /etc/ssh_host_key -o ! -f /etc/ssh_host_dsa_key ]
|
||||
then
|
||||
/etc/rc.d/sshd keygen
|
||||
@ -40,7 +42,7 @@ start_precmd() {
|
||||
}
|
||||
|
||||
keygen_cmd=sshd_keygen
|
||||
start_precmd=start_precmd
|
||||
start_precmd=sshd_precmd
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
|
Loading…
Reference in New Issue
Block a user