Best way for dealing with RC scripts

Matthew Seaman m.seaman at
Wed May 26 04:22:56 PDT 2004

On Wed, May 26, 2004 at 12:12:34PM +0200, Cyril Guibourg wrote:

> I am in the final stage of creating a new port and I would like to get
> some advice about the best way to handle differences between 4.X and 5.X
> for the startup script.
> The source of the port already comes from NetBSD pkgsrc with a RCNG style
> script. I plan tocreate a 4.X script and  add special targets in post-install
> in order to check ${OSVERSION} and then install the appropriate script.
> Is this a good way to do it or is there something better to do ?

Just provide the rcNG startup script, and add:

    USE_RC_SUBR= yes

to the Makefile.  That will cause system versions 4.x or lower
(actually it's ${OSVERSION} < 500037 to be pedantic) to install and
add a RUN_DEPENDS on the sysutils/rc_subr port automatically.



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP:         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-ports mailing list