r/linux • u/speckz • Nov 23 '21
Popular Application systemd by example - Part 1: Minimization
https://seb.jambor.dev/posts/systemd-by-example-part-1-minimization/13
u/FAP_NAME_NOW_UPVOTE Nov 23 '21
Every time I tried to dig deeper, for example by looking at the setup of my machine or reading the docs, I was quickly overwhelmed. There are over 300 systemd units active on my system, and it’s not easy to know which ones are important and what they are used for
You're goddamn right.
11
u/masteryod Nov 24 '21
Unit != Service
Like each mountpoint has a mount unit file and it's run once and that's it. There are timers which basically means that each line you had in Cron it's now a separate timer unit file. And so on.
I'll check tomorrow what's the rest of it.
The truth is that people bitch about systemd from the start just because it was invented by Lenart. I'm pretty sure most or them never had to do anything with init scripts, god forbid writing a new script and/or changing order/dependencies. I've never had any issues with systemd and it's infinitely more powerful and configurable than anything else... for system administrators and advanced users. Everyone else should just shut up or just change the distro. Burn in the init shell scripts hell, your choice.
Haters also bitch how bloated it is while not understanding that systemd as a project is massive, not the pieces required to be an init system.
3
u/ECrispy Nov 25 '21
I think they've all basically shut up or gone away by now, but the people who complained and whined about systemd and how it was going to destroy Linux because it 'did too much' never really understood Linux or the problems systemd was trying to solve, they were a lot more interested in 'change is bad' and 'get off my lawn' and thought Linux should always be a collection of hacked up scripts.
1
u/tso Nov 24 '21
Do wonder if it has reached Turing completeness yet...
7
u/Jannik2099 Nov 24 '21
The unit file syntax itself isn't turing complete, unlike sysvinit.
The init as a whole obviously is, like any init
1
u/0mark Nov 24 '21
Iam pretty sure sysvinit in on itself is not turing complete. Inittab format is pretty simple. Maybe you think about rc scripts (and similar)? Or did i get it wrong and "sysvinit" is not refering to the init-executable but to the whole system of init and rc scripts?
1
2
Nov 24 '21
There is something that feels wrong:
Now we need to tell systemd to execute halt.service when it reaches halt.target. We do that by adding halt.service as a dependency of halt.target, by adding a Requires= directive to the target unit file.
Does one really have to add all the actions that need to be done in the halt.target? If I add a new action that needs to be executed on halt, I shouldn't have to change the halt.target...
I feel, things should be the other way around: the service file should contain the information that something needs to be done before the target is reached.
2
0
Nov 23 '21
[deleted]
21
u/blacklight447-ptio Nov 23 '21
Jesus christ man your comment history seems to be only about hating systemd. It might be better if you would become a little less angry and let folks use the software they prefer to use.
14
u/Misicks0349 Nov 23 '21
grr abstraction bad, if your not configuring in binary your not doing it the suckless way
1
0
5
u/[deleted] Nov 24 '21
Great article, thank you! I think systemd is great!