Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Nov 2012 18:53:31 +0000 (UTC)
From:      Chris Rees <crees@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r307022 - head/www/squid32/files
Message-ID:  <201211051853.qA5IrVGk060334@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: crees
Date: Mon Nov  5 18:53:31 2012
New Revision: 307022
URL: http://svnweb.freebsd.org/changeset/ports/307022

Log:
  Style fixes to rc script
  
  Approved by:	Thomas-Martin Seck (maintainer)
  Feature safe:	yes

Modified:
  head/www/squid32/files/squid.in

Modified: head/www/squid32/files/squid.in
==============================================================================
--- head/www/squid32/files/squid.in	Mon Nov  5 18:02:04 2012	(r307021)
+++ head/www/squid32/files/squid.in	Mon Nov  5 18:53:31 2012	(r307022)
@@ -40,45 +40,26 @@
 #		use. See squid(8) for further details.
 #
 
-squid_checkrunning() {
-	${command} ${command_args} ${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} ${command_args} ${squid_flags} -k shutdown
-	run_rc_command poll
-}
-
 . /etc/rc.subr
 
 name=squid
 rcvar=squid_enable
 
+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}
+
 command=%%PREFIX%%/sbin/squid
 extra_commands=reload
 reload_cmd="${command} ${command_args} ${squid_flags} -k reconfigure"
-start_precmd="squid_setfib"
-stop_precmd="squid_checkrunning"
-stop_cmd="squid_stop"
-
-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"}
+start_precmd=squid_setfib
+stop_precmd="${command} ${command_args} ${squid_flags} -k check 2>/dev/null"
+stop_cmd=squid_stop
 
 pidfile=${squid_pidfile}
 procname=squid-1
@@ -94,4 +75,21 @@ required_files=${squid_conf}
 
 command_args="-f ${squid_conf}"
 
-run_rc_command "$1"
+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} ${command_args} ${squid_flags} -k shutdown
+	run_rc_command poll
+}
+
+run_rc_command $1



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211051853.qA5IrVGk060334>