Date: Sun, 18 Nov 2012 03:12:40 +0900 (JST) From: Hiroki Sato <hrs@FreeBSD.org> To: olivier@cochard.me, apache@FreeBSD.org, bapt@FreeBSD.org, tmseck@web.de Cc: ports@FreeBSD.org, gprspb@mail.ru, hrs@FreeBSD.org, se@FreeBSD.org Subject: ${name}_fib fix in rc.d script (ports/173366) Message-ID: <20121118.031240.1840537590824524280.hrs@allbsd.org>
next in thread | raw e-mail | index | archive | help
----Security_Multipart0(Sun_Nov_18_03_12_40_2012_033)-- Content-Type: Multipart/Mixed; boundary="--Next_Part(Sun_Nov_18_03_12_40_2012_304)--" Content-Transfer-Encoding: 7bit ----Next_Part(Sun_Nov_18_03_12_40_2012_304)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, I will commit the attached patch for the following today to fix a breakage of the rc.d script after ${name}_fib is introduced into rc.subr: net/sslh www/apache22 www/cblog www/fcgiwrap www/shellinabox www/squid www/squid31 www/squid32 net/sslh The change should be compatible with both of the older releases and head. If this commit is not convenient for you or there is something wrong with it, please let me know as soon as possible. Thank you. -- Hiroki ----Next_Part(Sun_Nov_18_03_12_40_2012_304)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="name_fib_fix_20121118-1.diff" Index: net/sslh/Makefile =================================================================== --- net/sslh/Makefile (revision 307518) +++ net/sslh/Makefile (working copy) @@ -7,6 +7,7 @@ PORTNAME= sslh PORTVERSION= 1.13 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.rutschle.net/tech/ Index: net/sslh/files/sslh.in =================================================================== --- net/sslh/files/sslh.in (revision 307518) +++ net/sslh/files/sslh.in (working copy) @@ -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 @@ 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"} Index: www/apache22/Makefile =================================================================== --- www/apache22/Makefile (revision 307518) +++ www/apache22/Makefile (working copy) @@ -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} Index: www/apache22/files/apache22.in =================================================================== --- www/apache22/files/apache22.in (revision 307518) +++ www/apache22/files/apache22.in (working copy) @@ -47,7 +47,6 @@ [ -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,9 +173,13 @@ } apache22_checkfib () { - $SYSCTL net.fibs >/dev/null 2>&1 - ret=$? - [ $ret -gt 0 ] && 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 + + apache22_fib={apache22_fib:-"NO"} if [ "x$apache22_fib" != "xNO" ] then command="/usr/sbin/setfib -F ${apache22_fib} ${command}" Index: www/cblog/Makefile =================================================================== --- www/cblog/Makefile (revision 307518) +++ www/cblog/Makefile (working copy) @@ -7,6 +7,7 @@ PORTNAME= cblog PORTVERSION= 0.1.6 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://files.etoilebsd.net/cblog/ Index: www/cblog/files/cblog.in =================================================================== --- www/cblog/files/cblog.in (revision 307518) +++ www/cblog/files/cblog.in (working copy) @@ -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 @@ 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"} Index: www/fcgiwrap/Makefile =================================================================== --- www/fcgiwrap/Makefile (revision 307518) +++ www/fcgiwrap/Makefile (working copy) @@ -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/ Index: www/fcgiwrap/files/fcgiwrap.in =================================================================== --- www/fcgiwrap/files/fcgiwrap.in (revision 307518) +++ www/fcgiwrap/files/fcgiwrap.in (working copy) @@ -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 @@ 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 @@ # 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"} Index: www/shellinabox/Makefile =================================================================== --- www/shellinabox/Makefile (revision 307518) +++ www/shellinabox/Makefile (working copy) @@ -7,6 +7,7 @@ PORTNAME= shellinabox PORTVERSION= 2.14 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= GOOGLE_CODE Index: www/shellinabox/files/shellinaboxd.in =================================================================== --- www/shellinabox/files/shellinaboxd.in (revision 307518) +++ www/shellinabox/files/shellinaboxd.in (working copy) @@ -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 @@ 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"} Index: www/squid/Makefile =================================================================== --- www/squid/Makefile (revision 307518) +++ www/squid/Makefile (working copy) @@ -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/ \ Index: www/squid/files/squid.in =================================================================== --- www/squid/files/squid.in (revision 307518) +++ www/squid/files/squid.in (working copy) @@ -45,7 +45,13 @@ } 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 @@ 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%%} Index: www/squid31/Makefile =================================================================== --- www/squid31/Makefile (revision 307518) +++ www/squid31/Makefile (working copy) @@ -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/ \ Index: www/squid31/files/squid.in =================================================================== --- www/squid31/files/squid.in (revision 307518) +++ www/squid31/files/squid.in (working copy) @@ -45,7 +45,13 @@ } 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 @@ 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%%} Index: www/squid32/Makefile =================================================================== --- www/squid32/Makefile (revision 307518) +++ www/squid32/Makefile (working copy) @@ -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/ \ Index: www/squid32/files/squid.in =================================================================== --- www/squid32/files/squid.in (revision 307518) +++ www/squid32/files/squid.in (working copy) @@ -50,7 +50,6 @@ : ${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 @@ 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 ----Next_Part(Sun_Nov_18_03_12_40_2012_304)---- ----Security_Multipart0(Sun_Nov_18_03_12_40_2012_033)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAlCn05gACgkQTyzT2CeTzy0YwwCdHYLpDsLzfk8zjef/D4ZCV78O ujwAoMw/KcyWmfF8pGd+cK19Sl14L5dv =8/W3 -----END PGP SIGNATURE----- ----Security_Multipart0(Sun_Nov_18_03_12_40_2012_033)----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121118.031240.1840537590824524280.hrs>