Subject: using pkg rc.d scripts
To: None <>
From: George Georgalis <>
List: tech-pkg
Date: 12/29/2005 00:04:13
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

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?

// George

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