←back to thread

466 points CoolCold | 3 comments | | HN request time: 0.001s | source
Show context
chillfox ◴[] No.40224400[source]
I am really not looking forward to systemd taking over another part of the system with how unpolished and flaky their replacements usually are.

Anyway, I have been using doas instead of sudo for a while on servers, it’s rock solid if you don’t need some of the more advanced features of sudo.

replies(1): >>40227229 #
9dev ◴[] No.40227229[source]
I honestly have no clue what you mean. You can take unit files, journald, timers, and all the other neat features from my cold, dead hands. I’m not going back to writing brittle shell scripts; systemd has made my life SO much easier.
replies(2): >>40234456 #>>40235030 #
michaelcampbell ◴[] No.40235030[source]
> I’m not going back to writing brittle shell scripts

Then stop doing that.

replies(2): >>40247128 #>>40252850 #
klysm ◴[] No.40247128[source]
Writing robust shell scripts ranges from hard to incredibly difficult. The number of footguns is insane
replies(1): >>40269981 #
chillfox ◴[] No.40269981[source]
It’s really not that hard. I have found that writing robust shell scripts is pretty easy.

Don’t use bash, stick to #!/bin/sh, use shellcheck, wrap all variables in quotes, use command -v to check if a binary is available before trying to use it, and don’t use gnu specific things.

replies(1): >>40275096 #
1. klysm ◴[] No.40275096[source]
Sure all of that is easy, but control flow is a nightmare. How do you deal with cleaning up resources on failures? Idempotency? Traps? It’s a fucking mess
replies(1): >>40283125 #
2. chillfox ◴[] No.40283125[source]
I don't know what to tell you other than skill issue.

I don't think shell is a great language or even that good for configuration, but it is pretty simple and the quantity of footguns are similar to JavaScript.

My issue with systemd is not the configuration file/language, that bit is pretty cool. My issue is mostly with all of the half-assed auxiliary services they keep pushing and something is not quite right with systemd itself, the complexity causes issues with weird edge cases.

Early in my career I was all for systemd, thought it was the greatest thing ever, then I got bit by the edge cases a few too many times. Meanwhile I have had zero issues with openrc or s6.

replies(1): >>40339686 #
3. klysm ◴[] No.40339686[source]
I don’t disagree about skill issue. I just don’t think you should require immense skill to implement simple control flow without shooting yourself in the foot. It’s much worse than modern JavaScript in my opinion.

I don’t buy the argument about all the auxiliary stuff. You are free to not use it.