Re: Systemd and forking programs (was systemd can't start a dæmon and doesn't give any error either)
tomas@tuxteam.de:
Inittab was the original way of doing things for AT&T, BSD copied
that, and SysV grafted /etc/init.d onto it. Slowly other unices
followed (alas!).
Some history seems in order.
There wasn't really an original way of doing things, as in First Edition
Unix this stuff, including starting up mel's da program, was simply
hard-coded into the init program itself. One can enjoy seeing
/usr/mel/da and the rest in the resurrected 1st Edition source.
By the time of Seventh Edition and 4BSD, init was running /etc/rc and
terminals were listed in /etc/ttys. The BSDs stuck with this for 2 to 3
decades more (depending from the BSD). AT&T on the other hand changed
to an inittab system with run-levels in System 3 at the start of the 1980s.
In the AT&T world, inittab was soon augmented and superseded, within a
decade. By the time of System 5 Release 4 in 1988 handling of terminal
login had been moved out of inittab to the Service Access Facility,
specifically to ttymon. IBM AIX likewise gained the System Resource
Controller in version 3.1 two years later, and reduced the number of
run-levels actually used to just 1 (everything in inittab being marked
as run level "2"). This left comparatively very little in inittab on
those systems and in practice did away with the run-level system on Unix
in the AT&T side of the universe.
By 1990.
Yes, run-levels and a lot of /etc/inittab were obsolete before Linux was
even invented.
* http://jdebp.eu./FGA/run-levels-are-history.html
Two years after that Miquel van Smoorenburg cloned the old System 5
init+rc system for Minix, but did not clone the more recent Service
Access Facility or anything like the SRC; meaning that terminal login
was back to the old inittab way of operating, inittab was back to being
full of stuff, and run-levels were back. Most Linux operating systems
adopted it. van Smoorenburg init had several different rcs to accompany
it. By the late 1990s there were so-called sysv-rc, the van Smoorenburg
one, and file-rc developed from Winfried Truemper's r2d2. van
Smoorenburg init itself did not stay static, splitting the old single
user mode into emergency and rescue modes in 1995, although it took
about 5 years for the names to fully catch on.
* http://jdebp.eu./FGA/emergency-and-rescue-mode-bootstrap.html
In the BSD world, things were quite turbulent as well, as the
edit-this-single-monolithic-shell-script system was proving troublesome
in real world use. One paper from the 1991 LISA conference published by
USENIX talked about how /etc/rc.local had accrued all of the very same
problems of /etc/rc that had caused /etc/rc.local to be split out in the
first place. FreeBSD re-engineered /etc/rc.local into an
/etc/rc.local.d/ system with drop-in files in 1995, and outright got
rid of /etc/rc.local in 1998. (The commit that deleted it was made by
one Matthew Dillon, after encouragement from Jordan Hubbard.) There was
a big discussion at the end of the decade, which culminated in Mewburn
rc replacing the old /etc/rc in NetBSD 1.5 in 2000, and in FreeBSD in
2002. Mewburn rc did not have run levels, and learned from experience
of van Smoorenburg rc, organizing things so that rc scripts were (as
intended and often, but alas far from always) a few lines of variable
assignments and just two commands. Gentoo's OpenRC went down the same
route years later in 2007. Debian's variant of van Smoorenburg rc
started going down the same route almost as long again after that, in 2014.
OpenBSD was the lone holdout, hanging on to the old 4BSD way until 2011
when it switched to a system similar to, but not the same as, Mewburn rc.
* http://jdebp.eu./FGA/rc.local-is-history.html
In the Linux world, there were then simpleinit, jinit, minit (once
packaged and part of Debian), runit-init (still packaged and part of
Debian) depinit, GNU dmd, pinit, initng, eINIT, upstart, finit, systemd,
nosh system-manager, s6-rc, and Epoch. Over the same period, Solaris
switched to the SMF and MacOS switched to launchd.
* http://jdebp.eu./FGA/inittab-is-history.html
* https://blog.darknedgy.net/technology/2015/09/05/0/
Reply to: