From 195039a651a26cefc114b1d0bac6df9a0e101bf6 Mon Sep 17 00:00:00 2001 From: hrs Date: Sun, 18 Nov 2012 16:33:31 +0000 Subject: Fix rc.d script to support systems before and after ${name}_fib is introduced into rc.subr. Bump PORTREVISION. Feature safe: yes --- www/squid/Makefile | 2 +- www/squid/files/squid.in | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'www/squid') diff --git a/www/squid/Makefile b/www/squid/Makefile index 1171e7fe2e72..f87a8ea12a1d 100644 --- a/www/squid/Makefile +++ b/www/squid/Makefile @@ -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/ \ diff --git a/www/squid/files/squid.in b/www/squid/files/squid.in index 499f79de6eea..56654a9950fe 100644 --- a/www/squid/files/squid.in +++ b/www/squid/files/squid.in @@ -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%%} -- cgit