Date: Sun, 18 Nov 2012 16:33:31 +0000 (UTC) From: Hiroki Sato <hrs@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r307542 - in head: net/sslh net/sslh/files www/apache22 www/apache22/files www/cblog www/cblog/files www/fcgiwrap www/fcgiwrap/files www/shellinabox www/shellinabox/files www/squid www/... Message-ID: <201211181633.qAIGXVpD065121@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hrs Date: Sun Nov 18 16:33:31 2012 New Revision: 307542 URL: http://svnweb.freebsd.org/changeset/ports/307542 Log: Fix rc.d script to support systems before and after ${name}_fib is introduced into rc.subr. Bump PORTREVISION. Feature safe: yes Modified: head/net/sslh/Makefile head/net/sslh/files/sslh.in head/www/apache22/Makefile head/www/apache22/files/apache22.in head/www/cblog/Makefile head/www/cblog/files/cblog.in head/www/fcgiwrap/Makefile head/www/fcgiwrap/files/fcgiwrap.in head/www/shellinabox/Makefile head/www/shellinabox/files/shellinaboxd.in head/www/squid/Makefile head/www/squid/files/squid.in head/www/squid31/Makefile head/www/squid31/files/squid.in head/www/squid32/Makefile head/www/squid32/files/squid.in Modified: head/net/sslh/Makefile ============================================================================== --- head/net/sslh/Makefile Sun Nov 18 15:13:12 2012 (r307541) +++ head/net/sslh/Makefile Sun Nov 18 16:33:31 2012 (r307542) @@ -7,6 +7,7 @@ PORTNAME= sslh PORTVERSION= 1.13 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.rutschle.net/tech/ Modified: head/net/sslh/files/sslh.in ============================================================================== --- head/net/sslh/files/sslh.in Sun Nov 18 15:13:12 2012 (r307541) +++ head/net/sslh/files/sslh.in Sun Nov 18 16:33:31 2012 (r307542) @@ -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"} Modified: head/www/apache22/Makefile ============================================================================== --- head/www/apache22/Makefile Sun Nov 18 15:13:12 2012 (r307541) +++ head/www/apache22/Makefile Sun Nov 18 16:33:31 2012 (r307542) @@ -2,7 +2,7 @@ PORTNAME= apache22 PORTVERSION= 2.2.23 -#PORTREVISION= 1 +PORTREVISION= 1 CATEGORIES= www ipv6 MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} DISTNAME= httpd-${PORTVERSION} Modified: head/www/apache22/files/apache22.in ============================================================================== --- head/www/apache22/files/apache22.in Sun Nov 18 15:13:12 2012 (r307541) +++ head/www/apache22/files/apache22.in Sun Nov 18 16:33:31 2012 (r307542) @@ -47,7 +47,6 @@ envvars="%%PREFIX%%/sbin/envvars" [ -z "$apache22limits_enable" ] && apache22limits_enable="NO" [ -z "$apache22limits_args" ] && apache22limits_args="-e -C daemon" [ -z "$apache22_http_accept_enable" ] && apache22_http_accept_enable="NO" -[ -z "$apache22_fib" ] && apache22_fib="NO" apache22_accf() { @@ -174,10 +173,14 @@ apache22_precmd() } apache22_checkfib () { - $SYSCTL net.fibs >/dev/null 2>&1 - ret=$? - [ $ret -gt 0 ] && return 0 - if [ "x$apache22_fib" != "xNO" ] + 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 + + apache22_fib={apache22_fib:-"NONE"} + if [ "x$apache22_fib" != "xNONE" ] then command="/usr/sbin/setfib -F ${apache22_fib} ${command}" else Modified: head/www/cblog/Makefile ============================================================================== --- head/www/cblog/Makefile Sun Nov 18 15:13:12 2012 (r307541) +++ head/www/cblog/Makefile Sun Nov 18 16:33:31 2012 (r307542) @@ -7,6 +7,7 @@ PORTNAME= cblog PORTVERSION= 0.1.6 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://files.etoilebsd.net/cblog/ Modified: head/www/cblog/files/cblog.in ============================================================================== --- head/www/cblog/files/cblog.in Sun Nov 18 15:13:12 2012 (r307541) +++ head/www/cblog/files/cblog.in Sun Nov 18 16:33:31 2012 (r307542) @@ -13,7 +13,6 @@ # cblog_enable=YES # # You can fine tune others variables too: -# cblog_fib="NONE" # cblog_socket="unix:/var/run/cblog/cblog.sock" # syntax can be : # unix:/patch/to/socket @@ -21,8 +20,13 @@ # Use cblog_user to run cblog as user cblog_setfib() { - sysctl net.fibs >/dev/null 2>&1 || return 0 + 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 + + cblog_fib=${cblog_fib:-"NONE"} case "$cblog_fib" in [Nn][Oo][Nn][Ee]) ;; @@ -48,7 +52,6 @@ start_precmd="cblog_precmd" load_rc_config $name cblog_enable=${cblog_enable:-"NO"} -cblog_fib=${cblog_fib:-"NONE"} cblog_user=${cblog_user:-"root"} cblog_socket=${cblog_socker:-"unix:/var/run/cblog/cblog.sock"} Modified: head/www/fcgiwrap/Makefile ============================================================================== --- head/www/fcgiwrap/Makefile Sun Nov 18 15:13:12 2012 (r307541) +++ head/www/fcgiwrap/Makefile Sun Nov 18 16:33:31 2012 (r307542) @@ -7,7 +7,7 @@ PORTNAME= fcgiwrap PORTVERSION= 1.0.3 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= www MASTER_SITES= http://cloud.github.com/downloads/gnosek/fcgiwrap/ Modified: head/www/fcgiwrap/files/fcgiwrap.in ============================================================================== --- head/www/fcgiwrap/files/fcgiwrap.in Sun Nov 18 15:13:12 2012 (r307541) +++ head/www/fcgiwrap/files/fcgiwrap.in Sun Nov 18 16:33:31 2012 (r307542) @@ -13,7 +13,6 @@ # fcgiwrap_enable="YES" # # You can fine tune others variables too: -# fcgiwrap_fib="NONE" # fcgiwrap_socket="unix:/var/run/fcgiwrap.sock" # this could also be: # - tcp:[ipv4_addr]:port (for ipv4) @@ -42,8 +41,13 @@ name="fcgiwrap" rcvar=fcgiwrap_enable fcgiwrap_setfib() { - sysctl net.fibs >/dev/null 2>&1 || return 0 + 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 + fcgiwrap_fib=${fcgiwrap_fib:-"NONE"} case "$fcgiwrap_fib" in [Nn][Oo][Nn][Ee]) ;; @@ -80,7 +84,6 @@ load_rc_config $name # These are just the defaults, they might get overriden for a specific profile. fcgiwrap_enable=${fcgiwrap_enable:-"NO"} -fcgiwrap_fib=${fcgiwrap_fib:-"NONE"} fcgiwrap_user=${fcgiwrap_user:-"root"} fcgiwrap_socket=${fcgiwrap_socket:-"unix:/var/run/fcgiwrap/fcgiwrap.sock"} Modified: head/www/shellinabox/Makefile ============================================================================== --- head/www/shellinabox/Makefile Sun Nov 18 15:13:12 2012 (r307541) +++ head/www/shellinabox/Makefile Sun Nov 18 16:33:31 2012 (r307542) @@ -7,6 +7,7 @@ PORTNAME= shellinabox PORTVERSION= 2.14 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= GOOGLE_CODE Modified: head/www/shellinabox/files/shellinaboxd.in ============================================================================== --- head/www/shellinabox/files/shellinaboxd.in Sun Nov 18 15:13:12 2012 (r307541) +++ head/www/shellinabox/files/shellinaboxd.in Sun Nov 18 16:33:31 2012 (r307542) @@ -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"} Modified: head/www/squid/Makefile ============================================================================== --- head/www/squid/Makefile Sun Nov 18 15:13:12 2012 (r307541) +++ head/www/squid/Makefile Sun Nov 18 16:33:31 2012 (r307542) @@ -77,7 +77,7 @@ PORTNAME= squid PORTVERSION= 2.7.${SQUID_STABLE_VER} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITES= ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \ http://mirrors.ccs.neu.edu/Squid/ \ Modified: head/www/squid/files/squid.in ============================================================================== --- head/www/squid/files/squid.in Sun Nov 18 15:13:12 2012 (r307541) +++ head/www/squid/files/squid.in Sun Nov 18 16:33:31 2012 (r307542) @@ -45,7 +45,13 @@ squid_checkrunning() { } squid_setfib() { - sysctl net.fibs >/dev/null 2>&1 || return 0 + 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 + + squid_fib=${squid_fib:-"NONE"} if [ "x${squid_fib}" != "xNONE" ]; then command="setfib -F ${squid_fib} ${command}" else @@ -76,7 +82,6 @@ load_rc_config ${name} squid_chdir=${squid_chdir:-"/var/squid/logs"} squid_conf=${squid_conf:-"%%PREFIX%%/etc/squid/squid.conf"} squid_enable=${squid_enable:-"NO"} -squid_fib=${squid_fib:-"NONE"} squid_flags=${squid_flags-"-D"} squid_pidfile=${squid_pidfile:-"/var/squid/logs/squid.pid"} squid_user=${squid_user:-%%SQUID_UID%%} Modified: head/www/squid31/Makefile ============================================================================== --- head/www/squid31/Makefile Sun Nov 18 15:13:12 2012 (r307541) +++ head/www/squid31/Makefile Sun Nov 18 16:33:31 2012 (r307542) @@ -51,6 +51,7 @@ PORTNAME= squid PORTVERSION= 3.1.${SQUID_STABLE_VER} +PORTREVISION= 1 CATEGORIES= www ipv6 MASTER_SITES= ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \ http://mirrors.ccs.neu.edu/Squid/ \ Modified: head/www/squid31/files/squid.in ============================================================================== --- head/www/squid31/files/squid.in Sun Nov 18 15:13:12 2012 (r307541) +++ head/www/squid31/files/squid.in Sun Nov 18 16:33:31 2012 (r307542) @@ -45,7 +45,13 @@ squid_checkrunning() { } squid_setfib() { - sysctl net.fibs >/dev/null 2>&1 || return 0 + 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 + + squid_fib=${squid_fib:-"NONE"} if [ "x${squid_fib}" != "xNONE" ]; then command="setfib -F ${squid_fib} ${command}" else @@ -76,7 +82,6 @@ load_rc_config ${name} squid_chdir=${squid_chdir:-"/var/squid"} squid_conf=${squid_conf:-"%%PREFIX%%/etc/squid/squid.conf"} squid_enable=${squid_enable:-"NO"} -squid_fib=${squid_fib:-"NONE"} squid_pidfile=${squid_pidfile:-"/var/run/squid/squid.pid"} squid_user=${squid_user:-%%SQUID_UID%%} Modified: head/www/squid32/Makefile ============================================================================== --- head/www/squid32/Makefile Sun Nov 18 15:13:12 2012 (r307541) +++ head/www/squid32/Makefile Sun Nov 18 16:33:31 2012 (r307542) @@ -37,7 +37,7 @@ PORTNAME= squid PORTVERSION= 3.2.${SQUID_STABLE_VER} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www ipv6 MASTER_SITES= ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \ http://mirrors.ccs.neu.edu/Squid/ \ Modified: head/www/squid32/files/squid.in ============================================================================== --- head/www/squid32/files/squid.in Sun Nov 18 15:13:12 2012 (r307541) +++ head/www/squid32/files/squid.in Sun Nov 18 16:33:31 2012 (r307542) @@ -50,7 +50,6 @@ load_rc_config ${name} : ${squid_chdir:=/var/squid} : ${squid_conf:=%%PREFIX%%/etc/squid/squid.conf} : ${squid_enable:=NO} -: ${squid_fib:=NONE} : ${squid_pidfile:=/var/run/squid/squid.pid} : ${squid_user:=squid} @@ -77,7 +76,13 @@ command_args="-f ${squid_conf}" squid_setfib() { - sysctl net.fibs >/dev/null 2>&1 || return 0 + 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 + + squid_fib=${squid_fib:-"NONE"} if [ "x${squid_fib}" != "xNONE" ]; then command="setfib -F ${squid_fib} ${command}" else
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211181633.qAIGXVpD065121>