aboutsummaryrefslogtreecommitdiff
path: root/www/squid
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2009-11-21 15:19:56 +0000
committerMartin Wilke <miwi@FreeBSD.org>2009-11-21 15:19:56 +0000
commit770fda5a4014713e54aa0163bdbc4b1d808a18d1 (patch)
treee77c7bbc305b798a3bf18fa1cde693292011c4ec /www/squid
parentb2c6e0714d07cf7417ca036ca3e2f7267f5c537e (diff)
downloadports-770fda5a4014713e54aa0163bdbc4b1d808a18d1.tar.gz
ports-770fda5a4014713e54aa0163bdbc4b1d808a18d1.zip
Notes
Diffstat (limited to 'www/squid')
-rw-r--r--www/squid/Makefile1
-rw-r--r--www/squid/files/squid.in14
2 files changed, 15 insertions, 0 deletions
diff --git a/www/squid/Makefile b/www/squid/Makefile
index 6e8dde5c7c86..816aeacd0a7d 100644
--- a/www/squid/Makefile
+++ b/www/squid/Makefile
@@ -76,6 +76,7 @@
PORTNAME= squid
PORTVERSION= 2.7.${SQUID_STABLE_VER}
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \
ftp://mirrors.24-7-solutions.net/pub/squid/%SUBDIR%/ \
diff --git a/www/squid/files/squid.in b/www/squid/files/squid.in
index bd9483908ae6..97b778d178f8 100644
--- a/www/squid/files/squid.in
+++ b/www/squid/files/squid.in
@@ -11,6 +11,9 @@
# /etc/rc.conf.d/squid to make this script actually do something. There
# you can also set squid_chdir, squid_pidfile, squid_user, and squid_flags.
#
+# On FreeBSD 7.1 and beyond you can use squid_fib to set a different routing
+# table for squid. See setfib(1) for details.
+#
# Please see squid(8), rc.conf(5) and rc(8) for further details.
#
@@ -18,6 +21,15 @@ squid_checkrunning() {
${command} ${squid_flags} -k check 2>/dev/null
}
+squid_setfib() {
+ sysctl net.fibs >/dev/null 2>&1 || return 0
+ if [ "x${squid_fib}" != "xNONE" ]; then
+ command="setfib -F ${squid_fib} ${command}"
+ else
+ return 0
+ fi
+}
+
squid_stop() {
echo "Stopping ${name}."
${command} ${squid_flags} -k shutdown
@@ -32,6 +44,7 @@ rcvar=${name}_enable
command=%%PREFIX%%/sbin/squid
extra_commands=reload
reload_cmd="${command} ${squid_flags} -k reconfigure"
+start_precmd="squid_setfib"
stop_precmd="squid_checkrunning"
stop_cmd="squid_stop"
@@ -39,6 +52,7 @@ load_rc_config ${name}
squid_chdir=${squid_chdir:-"%%PREFIX%%/squid/logs"}
squid_enable=${squid_enable:-"NO"}
+squid_fib=${squid_fib:-"NONE"}
squid_flags=${squid_flags-"-D"}
squid_pidfile=${squid_pidfile:-"%%PREFIX%%/squid/logs/squid.pid"}
squid_user=${squid_user:-%%SQUID_UID%%}