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 /www/shellinabox | |
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 'www/shellinabox')
-rw-r--r-- | www/shellinabox/Makefile | 1 | ||||
-rw-r--r-- | www/shellinabox/files/shellinaboxd.in | 13 |
2 files changed, 9 insertions, 5 deletions
diff --git a/www/shellinabox/Makefile b/www/shellinabox/Makefile index 09d0f8b9db73..7ef312c7afdb 100644 --- a/www/shellinabox/Makefile +++ b/www/shellinabox/Makefile @@ -7,6 +7,7 @@ PORTNAME= shellinabox PORTVERSION= 2.14 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= GOOGLE_CODE diff --git a/www/shellinabox/files/shellinaboxd.in b/www/shellinabox/files/shellinaboxd.in index 1cff58c7ae9a..d1e8c4d9a4dd 100644 --- a/www/shellinabox/files/shellinaboxd.in +++ b/www/shellinabox/files/shellinaboxd.in @@ -14,7 +14,6 @@ # shellinaboxd_enable="YES" # # You can fine tune others variables too: -# shellinaboxd_fib="NONE" # shellinaboxd_pidfile="/var/run/shellinabox.pid" # shellinaboxd_user="%%USERS%%" # shellinaboxd_group="%%GROUPS%%" @@ -24,9 +23,14 @@ # Example: shellinaboxd_certfile="/your/cert.pem" # shellinaboxd_flags= -shellinaboxd_setfib() { - sysctl net.fibs >/dev/null 2>&1 || return 0 +shellinaboxd_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 + + shellinaboxd_fib=${shellinaboxd_fib:-"NONE"} case "$shellinaboxd_fib" in [Nn][Oo][Nn][Ee]) ;; @@ -42,12 +46,11 @@ name="shellinaboxd" rcvar=shellinaboxd_enable command="%%PREFIX%%/bin/${name}" -start_precmd="shellinaboxd_setfib" +start_precmd="shellinaboxd_precmd" load_rc_config $name shellinaboxd_enable=${shellinaboxd_enable:-"NO"} -shellinaboxd_fib=${shellinaboxd_fib:-"NONE"} shellinaboxd_user=${shellinaboxd_user:-"%%USERS%%"} shellinaboxd_group=${shellinaboxd_group:-"%%GROUPS%%"} shellinaboxd_port=${shellinaboxd_port:-"4200"} |