From owner-freebsd-ports@FreeBSD.ORG Sun Feb 22 22:39:00 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65E0716A4CE for ; Sun, 22 Feb 2004 22:39:00 -0800 (PST) Received: from enterprise.sd73.bc.ca (romulus-net.sd73.bc.ca [142.24.13.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FBF343D1F for ; Sun, 22 Feb 2004 22:39:00 -0800 (PST) (envelope-from fcash-ml@sd73.bc.ca) Received: from mailtest.sd73.bc.ca (mailtest.sd73.bc.ca [10.10.10.14]) i1N6UZjd003051 for ; Sun, 22 Feb 2004 22:30:36 -0800 Received: from 24.71.131.139 (SquirrelMail authenticated user fcash) by mailtest.sd73.bc.ca with HTTP; Sun, 22 Feb 2004 22:39:00 -0800 (PST) Message-ID: <50589.24.71.131.139.1077518340.squirrel@mailtest.sd73.bc.ca> In-Reply-To: <2107.24.71.130.94.1077515696.squirrel@mailtest.sd73.bc.ca> References: <2107.24.71.130.94.1077515696.squirrel@mailtest.sd73.bc.ca> Date: Sun, 22 Feb 2004 22:39:00 -0800 (PST) From: "Freddie Cash" To: ports@freebsd.org User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-RAVMilter-Version: 8.4.1(snapshot 20020919) (enterprise.sd73.bc.ca) Subject: Re: OPTIONS, LATEST_LINK, and RCng X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2004 06:39:00 -0000 I've butchered the squid.sh script into the following. The resulting script appears to work and relies on an entry in /etc/rc.conf like the rest do. I've tested the various targets for the script and they seem to be doing the right thing. Would someone mind having a look to see if everything is kosher? Thanks. One quick question: Should "squid" be added to the REQUIRE line, or is that only for system services? *** Begin dansguardian.sh *** #!/bin/sh # # $FreeBSD$ # # PROVIDE: dansguardian # REQUIRE: NETWORKING SERVERS # AFTER: squid # KEYWORD: FreeBSD # # Note: # If you are running an rcNG-System (i.e. FreeBSD 5 and later or after # having installed the rc_subr-port on an earlier system) you must set # "dansguardian_enable=YES" in either /etc/rc.conf, /etc/rc.conf.local # or /etc/rc.conf.d/dansguardian to make this script actually do # something. # # Please see dansguardian(8), rc.conf(5) and rc(8) for further details. unset rcNG name="dansguardian" command="/usr/local/sbin/dansguardian" extra_commands="restart graceful" restart_cmd="${command} -r" graceful_cmd="${command} -g" stop_cmd="${command} -q" if [ -f /etc/rc.subr ]; then . /etc/rc.subr && rcNG="yes" else if [ -f /usr/local/etc/rc.subr ]; then . /usr/local/etc/rc.subr && rcNG="yes" fi fi if [ "${rcNG}" ]; then rcvar=`set_rcvar` load_rc_config ${name} run_rc_command "$1" else case "$1" in start) if [ -x "${command}" ]; then echo -n ' dansguardian' ${command} fi ;; stop) if [ -x "${command}" ]; then echo -n ' squid' ${stop_cmd} fi ;; restart) if [ -x "${command}" ]; then echo -n ' dansguardian' ${restart_cmd} fi ;; graceful) if [ -x "${command}" ]; then echo -n ' dansguardian' ${graceful_cmd} fi ;; *) echo "Usage: `basename $0` {start|stop|restart|graceful}" >&2 exit 64 ;; esac exit 0 fi *** End dansguardian.sh *** -- Freddie Cash fcash-ml@sd73.bc.ca