Hacker News new | ask | show | jobs
by nvarsj 3446 days ago
I'm not sure how you could write this with a straight face. Systemd has friction, but writing init scripts doesn't? Are you kidding me? Have you ever had to write init scripts for production servers? Writing systemd unit files is entirely more straightforward and simple than any init script hackery. And how is "journalctl -u sshd -f" not straightforward? Systemd has its issues sure, but your comment is pure FUD.
4 comments

Ad hominem aside...

"journalctl -u sshd -f" is not straightforward because it's a _redundant_ new command when I already know grep and tail. Small tools handling text is a wonderful way to make a system easy to learn and powerful to use, and we're just throwing that out.

You still have it good. I'm already flipping forward and backward between tail/less on the legacy systems, journalctl on the current systems, and `kubectl logs` on the new systems.
Got myself some "docker logs" and "heroku logs" also...
A) Yes I have had to write init scripts for production servers, and I've had to write whatever the hell they were before we had sysvinit. It wasn't always pleasant. There were times when you'd just edit things like /etc/rc.d/network and hack in some more commands.

B) I'm talking specifically about systemd init files, or whatever they're called. Given that they initialize things, that they replace conventional init files, the term applies.

Writing init scripts is as hard as you want it to be.

and 99% of sysadmins are not writing their own, they're modifying the ones supplied by distro maintainers.

If you're a distro maintainer then init scripts are something you write, something you understand because you're handling the state of your distribution from them.

Of course you can just abstract away all the code to another bash script and have your init as 2 lines (which is what openBSD actually does).

> and 99% of sysadmins are not writing their own, they're modifying the ones supplied by distro maintainers.

and even here, systemd makes things easier, more straightforward and comprehensible by allowing to modify system-provided units via drop ins. No need to copy, I get updates to the original units as I'm supposed in a clean and well-defined fashion.

Given that astrodust was mentioning "systemd init script" I'd think they are praising unit files and just got the terminology "wrong"...
What are they called, anyway? I know them as "that crap that lives in /etc/systemd where you can define services in easy to read INI-like files".