Subject: Re: using pkg rc.d scripts
To: None <>
From: George Georgalis <>
List: tech-pkg
Date: 12/29/2005 07:59:55
On Thu, Dec 29, 2005 at 12:51:51PM +0100, Lubomir Sedlacik wrote:
>On Thu, Dec 29, 2005 at 12:04:13AM -0500, George Georgalis wrote:
>> was wondering how people are starting pkgsrc rc.d scripts?
>> the only documentation I see is in 15.5.16 of doc/pkgsrc.txt, put
>> PKG_RCD_SCRIPTS=YES in /etc/mk.conf... but I'd really prefer the
>> control scripts to go in (or be removed from) /usr/pkg/etc/rc.d/
>> but there doesn't seem an established way to do this. I presume
>> something in /etc/rc.local (based on /etc/rc) like 
>> files=$(rcorder -s nostart ${rc_rcorder_flags} /usr/pkg/etc/rc.d/*)
>> for _rc_elem in $files; do
>>         run_rc_script $_rc_elem start
>> done
>> would work okay, but I'd just assume /usr/pkg/etc/rc.d/ scripts be
>> installed (and deinstalled) as long as I've got control via rc.conf or
>> some other invocation.
>> I tried setting various flavors of rc_rcorder_flags=/usr/pkg/etc/rc.d/*
>> in rc.conf but my /usr is not mounted when rcorder is run from /etc/rc
>> so is there another way to manage this? do we need a PKG_RCD_DIR?
>pkgsrc/mk/defaults/mk.conf:RCD_SCRIPTS_DIR?= /etc/rc.d
>if you want your package rc scripts separated, a very simple solution is
>to set it to "/etc/pkg/rc.d" and set rc_rcorder_flags accordingly.

well, I want them under ${PREFIX}, so for example, maybe I'll
someday have a nfs ${PREFIX} solution.

but wherever, what options are there to start them up?

is there a consensus? or do people typically set PKG_RCD_SCRIPTS
or something else?

// George

George Georgalis, systems architect, administrator <IXOYE>< cell:646-331-2027