> It wasn't broken, so it did not need fixing / rewriting.
Writing a robust init script in shell is a HUGE pain. Every distro seemed to have their own tools and methods for writing init scripts (e.g. Red Hat had /etc/init.d/functions, Debian had its own, Ubuntu had upstart) -- all of them sucked. systemd makes it easy (and for the most part, portable across systemd distros).
Here, people are complaining that systemd replaces the name resolution system. People also complains it handles tmpfiles, the random devices, the journal, etc... People complains that it replaced perfectly working, battle-tested components with new, unaudited code.
I don't personally care one way or another, btw. I'm a happy systemd user. But I understand the concern.
But, well, since I saw a 5-year-ago Stackoverflow question recommending double fork to daemonize which goes against process management best practices dating back to 1990s IBM AIX, I realize the Internet is not smart enough to get such delicate things straight. Maybe djb stuff was not easy to find. Whatever.
*"Portable across systemd" is not portable at all.
In trivial case, it's simple in any modern distro [1]
In non-trivial case, it's complicated. And the complexity is not going away, all you can do is move the complexity to one corner or another.
When you add the complexity to the shell script, it's right there, plain and clear.
When you move the complexity to systemd, it's not magically goes away - it just moves to thousands of lines of C code (of not the best quality on this planet, to say the least).
[1] https://wiki.gentoo.org/wiki/Handbook:X86/Working/Initscript...
You're ignoring that complexity was added to every single init script. Every init script had its own potential bugs, issues, race conditions, dependency logic, etc etc.
Now you're moving it to one single master system.
No, it's not "magically going away". The repetition is going away. The code duplication of an extremely complex system is going away.
depend() {
need localmount
after bootmisc
}
reload() {
ebegin "Reloading configuration"
start-stop-daemon --signal HUP --pidfile ${pidfile} ${command##*/}
eend $?
}To provide the features "just" the init replacement part of systemd provides isn't even possible with most other inits, no matter how you write your script.
I'm not even sure where to begin when addressing a comment like this. You're biased against systemd in the first place so I don't see the point in discussing this.
It's really amusing that basic software engineering principles are thrown out of the window the moment things get political.
Things get political that very second back then when systemd crowd started pushing their agenda to the masses using strategies like gentle push.
. filename or source filename allow one script to effectively import another. This means that the various logic can live in one place and be reused.
Modular designs are good, monolithic designs are bad. Dependencies are bad and so on. Lots of choices at the design level were made against fairly hard won knowledge on how to architect complex software systems. All these dependencies translate into 'all or nothing' and that is never a good thing in the software world. It's just another form of lock-in, something that the world of closed source software is good at and I'm quite sad to see it pollute the world of open source.
Edit: I suspect a lot of the pushback against systemd - mertited or not - is because a lot of people in charge of little parts of the bazaar have seen their pet projects cast aside by the major distros and taken over by the systemd devs. In a world where street cred is a big force in motivating people to contribute to open source being maintainer of 'x' where 'x' is part of each and every linux distro out there and then to see 'x' taken over by systemd in a fairly rough manner without any kind of co-operation between the old maintainers and the new kids on the block there are bound to be a lot of ruffled feathers. But that's not technology, that's just ego.
If we never replace things with better things, we'd be using superpowered DOS machines to this day. I don't get the "knowledge has to be discarded and then has to be replaced by different knowledge" argument if the new knowledge is of a better tool.
I'm not all in with systemd's ethos, but I don't see a significantly better tool around.
> when disks were mechanical
DISKS are STILL mechanical. They will always be. That is why it's called a disk. You thinking is limited to fancy laptops and not considering enterprise servers.
> If we never replace things with better things
Better? That is far too strong. Things are not always better but making certain use cases easier. That does not mean it's better. Systemd has nice features, indeed; but it's also limiting in terms of losing the capabilities of full blown shell script. Sometimes this latter is very handy.
Edit: Downvote? Nice. Try commenting instead.
All of the servers I manage except for a few legacy ones are SSDs by now, for the simple reason that they are cheaper to operate at this point:
They consume less energy, and while their price per GB is high, their IOPS per GB is high enough that we can get away with far fewer replicas of each item of data and still get good enough performance.
I can't afford not to use SSDs in every new server we provision.
Not using SSDs in your servers today means you're behind the curve except in certain niches where performance doesn't matter but sheer storage volume does. That too is set to change within the next couple of years with current rates of cost reductions.
There are niches, such as long term archival, backups, etc. where disks may still be competitive, but even those are rapidly being eroded.
For things like web servers or database servers, I'll never provision another machine without SSDs.
From the little I know, socket activation seems to be systemd's main attractive item.
But it's not "taking over" anything at all. People choose to use these components.
And yes, it was and is broken. With respect to specifically DNS, have you tested the various documented options for resolv.conf, for example, and confirmed what your resolver actually does?
I have, and on several different systems with different distros, what I found was that none of them behaved as documented. DNS resolution on most Linux distros is badly deficient, which is one of the reasons so many applications pull in their own resolver libraries, and one of the reasons so some distributions end up e.g. running local Dnsmasq instances to farm out the actual resolution to something that's easier to get to behave in sane ways.
DNS has been broken on most linux systems for a long time. If you read the ubuntu mailing list post, this is the problem they are solving:
* On servers, cloud images etc. we did not have any local DNS server. Configured DNS servers (via DHCP or static configuration in /etc/network/interfaces) were put into /etc/resolv.conf, and every program (via glibc's builtin resolver) directly contacted those.
This had the major drawback that if the first DNS server does not
respond (or is slow), then *every* DNS lookup suffers from a ~ 10s
timeout, which makes every network operation awfully slow.
Addressing this was the main motivation for the blueprint. On top
of that, there was no local caching, thus requesting the same name
again would do another lookup.
I don't particularly care HOW they fix that issue (local dnsmasq/unbound/resolvd) but to pretend that there isn't a problem is sticking your head in the sand.
I haven't seen any single subsystem harm the linux eco-system as much as systemd has and while I understand the desktop vendors clout in this the server is where linux shines and that was territory that was hard won.
If all systemd had done was offer an alternative init system then that would have been a non-event, to take over the entirety of the linux system side tried-and-true and battle tested utilities is irresponsible at best and dangerous at worst. It wasn't broken, so it did not need fixing / rewriting.