diff options
author | hrs <hrs@FreeBSD.org> | 2012-11-19 00:33:31 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2012-11-19 00:33:31 +0800 |
commit | 195039a651a26cefc114b1d0bac6df9a0e101bf6 (patch) | |
tree | 1ffb9d9fff08f721f8e673e137d247bc6e798adc /net | |
parent | 03d9a748d38e91280f908d9280c3633b691f8867 (diff) | |
download | freebsd-ports-gnome-195039a651a26cefc114b1d0bac6df9a0e101bf6.tar.gz freebsd-ports-gnome-195039a651a26cefc114b1d0bac6df9a0e101bf6.tar.zst freebsd-ports-gnome-195039a651a26cefc114b1d0bac6df9a0e101bf6.zip |
Fix rc.d script to support systems before and after ${name}_fib is introduced
into rc.subr. Bump PORTREVISION.
Feature safe: yes
Diffstat (limited to 'net')
-rw-r--r-- | net/sslh/Makefile | 1 | ||||
-rw-r--r-- | net/sslh/files/sslh.in | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/net/sslh/Makefile b/net/sslh/Makefile index b4368b644a52..4d97e4a9e906 100644 --- a/net/sslh/Makefile +++ b/net/sslh/Makefile @@ -7,6 +7,7 @@ PORTNAME= sslh PORTVERSION= 1.13 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.rutschle.net/tech/ diff --git a/net/sslh/files/sslh.in b/net/sslh/files/sslh.in index af6b70ae7caa..16afac2d4bcf 100644 --- a/net/sslh/files/sslh.in +++ b/net/sslh/files/sslh.in @@ -17,7 +17,6 @@ # sslh_mode="fork | select" # fork: stable but slow performance # select: new but high performance -# sslh_fib="NONE" # sslh_pidfile="/var/run/sslh.pid" # sslh_ssltarget="localhost:443" # sslh_sshtarget="localhost:22" @@ -26,9 +25,13 @@ # sslh_uid="nobody" # sslh_flags -sslh_setfib() { +sslh_precmd() { + if command -v check_namevarlist > /dev/null 2>&1; then + check_namevarlist fib && return 0 + fi sysctl net.fibs >/dev/null 2>&1 || return 0 + sslh_fib=${sslh_fib:-"NONE"} case "$sslh_fib" in [Nn][Oo][Nn][Ee]) ;; @@ -43,14 +46,13 @@ sslh_setfib() { name="sslh" rcvar=sslh_enable -start_precmd="sslh_setfib" +start_precmd="sslh_precmd" stop_postcmd="sslh_postcmd" load_rc_config $name sslh_enable=${sslh_enable:-"NO"} sslh_mode=${sslh_mode:-"fork"} -sslh_fib=${sslh_fib:-"NONE"} sslh_listening=${sslh_listening:-"0.0.0.0:443"} sslh_sshtarget=${sslh_sshtarget:-"localhost:22"} sslh_ssltarget=${sslh_ssltarget:-"localhost:8443"} |