4 ms·
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 ini
by dharmab 5y ago
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.
- kzrdude 5y agoAnd less distro divergence in how to write the service scripts, or how to start services etc.
- Blikkentrekker 5y agoIt was not. 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: #!/sbin/openrc-run command=sshd args="-D" daemon=no provides=ssh after=net 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.
- wruza 5y agoAnd 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.
- johnny22 5y agois 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. I still prefer and use systemd though.
- Blikkentrekker 5y agoNo, 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.
- awrmc 5y ago>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.
- marcan_42 5y agoOpenRC 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.
- imwillofficial 5y ago“ It was not.” Yes it was Upstart was super short lived, and OpenRC hardly used. The vast, and I mean vast majority of distros used SysV before transitioning to SystemD