OPTIONS, LATEST_LINK, and RCng

Oliver Eikemeier eikemeier at fillmore-labs.com
Mon Feb 23 01:04:20 PST 2004


Freddie Cash wrote:

> While updating the www/dansguardian* ports to use the new OPTIONS and
> LATEST_LINK variables, I noticed that the www/squid port now uses RCng
> for the startup script.  This is good news, because it means I can
> rename the dansguardian startup script back to dansguardian.sh and
> just use RCng to make sure it's started after squid.

This will work only if you move your start/stop scripts to /etc/rc.d,
see PR 56736:
  <http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/56736>

> One quick question:  Should "squid" be added to the REQUIRE line, or
> is that only for system services?

Since you have a RUN_DEPENDS of squid, yes.

> unset rcNG
> [...]
> 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

You should just USE_RC_SUBR=yes with

post-build:
	${SED} -e 's,%%RC_SUBR%%,${RC_SUBR},g' ${FILESDIR}/dansguardian.sh \
		>${WRKDIR}/dansguardian.sh

in the Makefile and . %%RC_SUBR%% in the start/stop script

-Oliver


More information about the freebsd-ports mailing list