diff options
author | mnag <mnag@FreeBSD.org> | 2006-02-22 03:28:37 +0800 |
---|---|---|
committer | mnag <mnag@FreeBSD.org> | 2006-02-22 03:28:37 +0800 |
commit | ec77a6fee16f45a5033d8a44e5ffc8cac6822aec (patch) | |
tree | 9af60c50c01a2c00b1f31fc682e3680a18242eb8 /security/openssh-portable | |
parent | dfbb505ad42a1a509968a2f94b23d1cdcba48ba0 (diff) | |
download | freebsd-ports-gnome-ec77a6fee16f45a5033d8a44e5ffc8cac6822aec.tar.gz freebsd-ports-gnome-ec77a6fee16f45a5033d8a44e5ffc8cac6822aec.tar.zst freebsd-ports-gnome-ec77a6fee16f45a5033d8a44e5ffc8cac6822aec.zip |
- Fix order in rc.d script. Because of pidfile are empty, reload [2] and restart [1]
commands kill all connections.
- Separate keygen part and create keygen command.
- Bump PORTREVISION
PR: 93228 [1]
Reported by: DanGer on #bsdports [2]
Diffstat (limited to 'security/openssh-portable')
-rw-r--r-- | security/openssh-portable/Makefile | 1 | ||||
-rw-r--r-- | security/openssh-portable/files/openssh.in | 31 |
2 files changed, 18 insertions, 14 deletions
diff --git a/security/openssh-portable/Makefile b/security/openssh-portable/Makefile index dcec8aed5885..00c1e6b7c8f5 100644 --- a/security/openssh-portable/Makefile +++ b/security/openssh-portable/Makefile @@ -7,6 +7,7 @@ PORTNAME= openssh DISTVERSION= 4.3p2 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= security ipv6 MASTER_SITES= ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/%SUBDIR%/ \ diff --git a/security/openssh-portable/files/openssh.in b/security/openssh-portable/files/openssh.in index 88eb3282e456..15af62da811c 100644 --- a/security/openssh-portable/files/openssh.in +++ b/security/openssh-portable/files/openssh.in @@ -11,7 +11,7 @@ # Default is "NO". # openssh_flags (flags): Set extra flags to openssh. # Default is "". see sshd(1). -# openssh_pidfile (path): Set full path to pid file. +# openssh_pidfile (file): Set full path to pid file. # Default is "/var/run/sshd.pid". # @@ -20,20 +20,20 @@ name="openssh" rcvar=${name}_enable -command=%%PREFIX%%/sbin/sshd -extra_commands="reload" +load_rc_config ${name} -pidfile=${openssh_pidfile} +: ${openssh_enable="NO"} +: ${openssh_pidfile="/var/run/sshd.pid"} +command=%%PREFIX%%/sbin/sshd +extra_commands="reload keygen" start_precmd="${name}_checks" restart_precmd="${name}_checks" +keygen_cmd="${name}_keygen" +pidfile=${openssh_pidfile} -openssh_checks() +openssh_keygen() { - if checkyesno sshd_enable ; then - err 1 "sshd_enable is set. Please set sshd_enable to NO in your rc.conf" - fi - if [ ! -f %%ETCSSH%%/ssh_host_key -o \ ! -f %%ETCSSH%%/ssh_host_dsa_key -o \ ! -f %%ETCSSH%%/ssh_host_rsa_key ]; then @@ -73,13 +73,16 @@ openssh_checks() fi fi - - eval "${command} -t" } -load_rc_config $name +openssh_checks() +{ + if checkyesno sshd_enable ; then + err 1 "sshd_enable is set. Please set sshd_enable to NO in your rc.conf" + fi -: ${openssh_enable="NO"} -: ${openssh_pidfile="/var/run/sshd.pid"} + run_rc_command keygen + eval "${command} -t" +} run_rc_command "$1" |