On Sat, 12 Sep 2015 08:02:11 -0700 (PDT)
Roger Marquis wrote:

> RW via freebsd-ports wrote:
> > You'd rather an rc script fails at run-time and shuts down the wrong
> > daemon than fail when the script is being developed?
> 
> It's not so much where the script fails than that it fails in the
> first place.  Neither a pidfile nor a command_interpreter needs to be
> required for an rc scripts to work.  These are nice features but
> making them mandatory is at best a sort of premature optimization.

It's not mandatory; you only need to define it if you want to be
able to stop an interpreted  daemon using the default method.

If you have some other way of shutting down a daemon without knowing its
name and PID  then you can just supply a stop function to do it.



> The freebsd rc script environment is already far too OS-specific and
> un-editable, often containing no readable shell code at all.

That's not been my experience. Occasionally it might a bit harder to
customise the script, but that's outweighed by all the times an override
can be made cleanly in rc.conf, without having to modify an installed
script. I've found that practically all customizations can be done
through rc.conf, and the rest usually involve editing an existing
stop/start function.

And rcng make it easy to keep multiple copies of the same rc file, you
can keep separate config and switch between them from rc.conf.


> What if
> your interpreter changes from say python2.7 to python for example?
> Does that mean you have to reinstall all the associated packages or
> edit their rc scripts?

If the interpreter changes from python2.7 to python, you'd have to
change the shebangs anyway.

 
_______________________________________________
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to