Hi, > >> I'm just editing a small program that makes use of FreeBSD's service(8): > >> http://www.freebsd.org/cgi/man.cgi?query=service&apropos=0&sektion=8&manpath=FreeBSD+8.2-RELEASE&arch=default&format=html > >> > >> I wonder: Is there such a generic way in NetBSD for restarting services, > >> too? Or should I just take scripts from /etc/rc.d (as, in opposition to > >> FreeBSD, NetBSD does not have a second rc.d directory)? > > > > There may be additional rc.d directories. > > > > See "man rc.conf" for "rc_directories". (I am not sure why not used for > > shutdown though.) > > > > There was discussion on adding an service type script (one idea was > > called "rcadmin"), but I don't think it ever happened. See the long > > "admin script for ipfilter" thread at > > http://mail-index.netbsd.org/tech-userlevel/2006/12/oindex.html > > and > > http://mail-index.netbsd.org/tech-userlevel/2007/01/oindex.html > > > > The FreeBSD service shell script looks like it would be mostly > portable except for the jails and $local_startup variable. I can't read of the reason why it wasn't imported in that thread, though I didn't read it that exactly. So, should I parse rc.conf myself or wait for such a script being committed? I like the FreeBSD way more than having to do that myself, and I think the functionality of the script service(8) is very sane (without having looked at the code). From Matthew Mondor: > Generally /etc/rc.d/foo restart indeed; I'm not very familiar with > FreeBSD lately so am not sure if it compares to its second rc.d > directory, but there can also be /usr/pkg/share/examples/rc.d/ But this directory is rather meant for copying files to /etc/rc.d, isn't it? If not, the name is really misguiding (and it's also stated that way in the guide). Regards, Julian
Attachment:
signature.asc
Description: PGP signature