A bunch of very large bash scripts that were entirely different in each distro, had tons of races and were much slower to boot (one of the reasons why systemd became so popular and there was popular pressure to switch to it is that it would speed up booting by several seconds).
Also upstart, which was actually pretty good, but systemd was more ambitious.
I agree with most of this but have to disagree about these shell scripts being slow. On Debian most of them were written for dash instead of bash and they were executed in parallell based on magic comments which defined the dependencies. It was still a mess but a mess which was fast, not as fast as systemd but fast enough for most users.
Additionally Upstart was not good. It has some good ideas but its approach to dependencies was generally regarded as unintuitive. Writing services in systemd is much more obvious than writing for Upstart.
For the init system, the most common predecessor was a combination of sysvnit and "initscripts" (a shell script for each daemon on your system). Writing the init scripts was simple for the most basic cases but quite complex for complete, bug free case coverage. A big appeal of systemd for packagers and sysadmins was the relative simplicity of unit files. Now we just have to fill out a simple boilerplate INI style file for most services.
There is strange false history that systemd replaced sysvinit, which occurred only on Debian, because Debian was the last major system to discard sysvinit.
Gentoo had replaced sysvinit with OpenRC in 2006; Fedora and Ubuntu were using Upstart in 2005. systemd primarily replaced Upstart and systems that used Runit or OpenRC tended to have stayed with them.
Frankness be, this false history seems to be crafted in order to compare it with very outdated technology to make it look good. Obviously systemd is better than sysvinit, technology that almost all systems but Debian had discarded long before systemd was even started. The issue is whether it compares favorably to Upstart, runit, and OpenRC, and to the first I would say yes, because Upstart was full of very ugly hacks and didn't deliver it's ambition. In the second two cases, their mode of operation is so different that it's hard to compare. runit was inspired by daemontools and is very simple and effective and works in a very different way from most models of service management; OpenRC is backwards compatible with sysvinit and is essentially a large library so that init scripts typically need nothing more than something such as:
Or something similar to work. I forgot the exact syntax but it works similar to simply assigning some variables and it handles the rest, but it still gives one full access to the shell to use whatever shell functionality one wants.
Yeah OpenRC is pretty great and much lighter than systemd. It's way better than sysvinit. Less daemons running than systemd and it doesn't try to be more than just an init system. I use alpine on all my servers for this reason. And because it's so minimalistic as a distribution, I can just install what I need and nothing else at all. On a desktop system with the OS being suspended, USB devices coming and going systemd makes more sense I think.
But on the desktop I use FreeBSD which has a different system again.
By the way alpine is also working on a full service manager init system (like systemd) but more minimalistic, based on s6 service manager. Looking forward to seeing how that pans out.
When something comes from the alpine team I have a much higher confidence that I'll like it than from RedHat :) I don't care for Gnome either as it has become so opinionated.
Misleading in that Ubuntu and Fedora did use Upstart but not in its native mode, they used it in its sysvinit compatibility mode. This is almost identical to sysvinit, so from the point of view of a user or a package maintainer it was functionally barely distinguishable from sysvinit.
OpenRC was considered by Debian, but 7 out of 8 members of the technical committee preferred both systemd and Upstart to OpenRC (Ian Jackson preferred sysvinit over OpenRC and "further discussion" over every other option).
There was also uselessd, which was the systemd init system without the rest. https://bitbucket.org/Tarnyko/uselessd/src/linux-devel/ It was a joke, but nonetheless if you like systemd's init system them you are probably going to like uselessd, because that's what it is - systemd's init system without the rest.
At 82k loc it's huge for what it does, but nonetheless is order(s?) of magnitude smaller than systemd. If it was active I'd trust it more that systemd on that basis alone.
I can't say I'm a fan of systemd's event driven approach. A system whose state depends on it's configuration plus past state is usually a nightmare to debug and control compared to a system who state is dependent on it's configuration alone - and that's how it has worked out for me and systemd.
The simple cases work fine of course but systemd's power over what came before it is it's dependency relationships it allows you setup. But they are the very things that break in weird and wonderful ways when the events it's reacting to fire in an unexpected order. If you could set them up reliably without much thinking it would be a big win - but as it is, not so much.
> Incorrect in that openSUSE and Arch are major distros and migrated from sysvinit to systemd.
OpenSUSE also had upstart in the meanwhile but continued to support sysvinit as an alternative.
Arch Linux had sysvinit as it's pid1, but it's big sell initially was that, similar to Crux, it had a custom BSD-style init script setup and did not use sysvinit's booting and rc mechanism.
OpenRC systems typically also continue to use sysvinit's pid1 to this day, which is not the complaint people have with it but the impossible to understand script sand lack of dependency management of it's service management because it was never meant to do service management which was a bit of a hack.
> Misleading in that Ubuntu and Fedora did use Upstart but not in its native mode, they used it in its sysvinit compatibility mode. This is almost identical to sysvinit, so from the point of view of a user or a package maintainer it was functionally barely distinguishable from sysvinit.
There is no such compatibility mode as far as I know. A big sell of Upstart and OpenRC was always that it was backwards compatible with old-style sysvinit-style scripts even though new ones were written in the new style. There is no global mode as far as I know but no doubt many of the olds scripts remained.
> OpenRC was considered by Debian, but 7 out of 8 members of the technical committee preferred both systemd and Upstart to OpenRC (Ian Jackson preferred sysvinit over OpenRC and "further discussion" over every other option).
That would not surprise me. It's not what Debian is looking for.
openSUSE 12.1 defaults to systemd (see previous comment), with sysvinit as non-default option.
So Upstart was a short-lived non-default option.
> A big sell of Upstart and OpenRC was always that it was backwards compatible with old-style sysvinit-style scripts even though new ones were written in the new style.
You are right that there are no distinct modes as such, my memory is quite fuzzy as it's been some years, and I wouldn't rely on anything I say. And it looks like Ubuntu (unlike Fedora) did replace a lot of init.d scripts with native Upstart jobs.
I can't remember what the problem was with mixing init.d scripts and native Upstart jobs, or what impact it had, maybe it was not important in practice.
The Debian wiki has this item, but, well, it's a Wiki, so perhaps it's not the most reliable source.
Can't set proper dependencies until everything has converted from SysV init files to Upstart jobs.
And we can excuse Debian for that, because it was an OS of choice for those who plan to run things for a decade or two. If Debian included modern web frameworks into the distro, most of them wouldn't make it into stable.
> The issue is whether it compares favorably to Upstart, runit, and OpenRC
I would add S6 to the list, as this would be the better challenger to systemd.
That said, I use OpenRC daily on Alpine servers with little to complain about.
is that 2006 number correct re: gentoo? Although i wouldn't start by comparing against openrc, but rather the previous uhmm "baselayout" init system. (sorry, i haven't used gentoo in a long time).
The previous gentoo init system was already better than sysvinit and initscripts.
No, it is actually incorrect, all numbers are incorrect by one year it seems. Gentoo switched in 2007, and Ubuntu and Fedora used Upstart since 2006.
And why wouldn't you compare it with the systems it actually competes against and replaces rather than against something that was barely used any more before systemd even stated development? The comparison with sysvinit, suggesting that those that do not use systemd advocate sysvinit instead, is simply a flagrant straw-man designed to make systemd look good.
OpenRC was a C rewrite of what was previously a bunch of bash scripts, but they still implemented the same rich dependency and function-based init logic; it was miles ahead of Debian's init.d scripts before it became OpenRC. OpenRC largely made it faster, and over the years the configuration became (optionally) more declarative and gained features. The actual OpenRC transition was largely seamless for users, because the init script syntax didn't change.
So the year you're looking for isn't when OpenRC was introduced, but rather when Gentoo started using the OpenRC style of init script, which happened much earlier - it's definitely been like that since I started using Gentoo, at least since 2003 or so.
It's actually a misconception that sysvinit is the whole init system; sysvinit is PID 1. Gentoo still uses sysvinit for PID 1 by default. What matters is what your service manager is - that's OpenRC here.
>And why wouldn't you compare it with the systems it actually competes against and replaces rather than against something that was barely used any more before systemd even stated development?
I would say that's a meaningless comparison and those other systems were never considered as real replacements. At that time I don't remember OpenRC getting any traction outside of Gentoo, and the distros using Upstart were already unhappy with it. Adding to that, systemd explicitly was targeting distros that used a lot of sysvinit scripts and was intended to be used as an upgrade for them. It's largely succeeded at that.
Take a look at OpenBSD. They managed to sidestep all this drama, and still ship a sane, well-documented init.
If you spend an afternoon installing it and configuring a few network services, you’ll already know most of what there is to know about how init used to work.
It used to be extremely elegant and robust.
The main flaw in the design was that the “service” files were written in a Turing complete language, which meant that distribution maintainers could ship things that were arbitrarily terrible, and many chose to do so.
(Edit: Also, the organizations that somehow couldn’t figure out how to use and maintain traditional init systems were the ones that produced the current generation replacements and pushed them so hard.)
> Also, the organizations that somehow couldn’t figure out how to use and maintain traditional init systems were the ones that produced the current generation replacements and pushed them so hard.
This is revisionist. The organizations that built the current generation were those who had to support those who couldn't figure out how to use and maintain "traditional" init systems. Distro init scripts were (usually, and at great effort) decent, whether from Red Hat, SuSE, Debian, etc. (just don't ask too hard about why they were different). But the third-party (often, but not exclusively, proprietary) software vendors looking to support even a single distro were godawful. Eventually the support burden for e.g. Red Hat got large enough it made more sense to replace it wholesale than keep mentoring the latest batch of e.g. Oracle interns in how to write half-decent shell scripts.