Why FreeBSD should not adopt launchd
blog.darknedgy.net
blog.darknedgy.net
There's a legitimate discussion about tradeoffs to be had, sure. But at least since Fred Brooks it's been quite clear that conceptual integrity is valuable. And the concepts behind Unix have been shown to be consistent and powerful; Plan 9 demonstrated that there's still unexploited potential there.
The Unix philosophy argument may be wrong in a particular case, but it shouldn't be derisively dismissed.
Certainly, this is not without controversy. However, it seems like Hubbard has pissed off far fewer people than Lennart did, so his ideas are likely to get a much more receptive response and actual technical discussion beyond "Lennart wrote it so I hate it.". In addition, Hubbard and co are likely to have learned from the systemd fiasco, and other *BSD systems have written some other solutions in this space. These ideas are falling on relatively fertile ground.
However, the FreeBSD leadership will occasionally make a decision and tell people to get stuffed if they don't agree. I would cite the GEOM changeover, in particular. People forget the vitriol that accompanied it now that it has been well integrated.
init(8) != System V init scripts
https://www.freebsd.org/cgi/man.cgi?query=init&apropos=0&sek..."launchd(8) replaces: init, rc, the init.d and rc.d scripts" (source: https://wiki.freebsd.org/launchd)
You are right. I was drawing on quite old knowledge regarding the OS-X boot process in thinking launchd worked in collaboration with init(8) and friends. Apparently, it has been this way for some time[1].
I have been aware of launchd replacing rc.d since its introduction. What I did not realize is that it supplanted init as PID 1. Knowing that this is the case, I am less likely to support its adoption FWIW.
Maybe someone here knows how to do this properly (or better):
# /usr/local/etc/rc.d/dnscrypt-proxy
#
# PROVIDE: dnscrypt_proxy
# REQUIRE: ldconfig cleanvar NETWORKING
# BEFORE: SERVERS local_unbound
# KEYWORD: shutdown
^--- REQUIRE: ... NETWORKING always seems to cause a circular dependency (as per running: rcorder /etc/rc.d/* /usr/local/etc/rc.d/*)Help appreciated, not required, just showing a real-life example.
It's not doing all of that stuff in pid 1