0
()
submitted a long while ago by @ to c/@
you are viewing a single comment's thread
view the rest of the comments
[-] stsquad@lemmy.ml 31 points 3 months ago

While shell based RC systems do offer flexibility they also have downsides including copy and paste leading to subtly different behaviour across units. Dependency resolution was also a bit of a hack on top of scripts to deal with concepts like run levels.

The declarative approach of a proper configuration is a better and more scalable solution.

[-] dsemy@lemm.ee 11 points 3 months ago

they also have downsides including copy and paste leading to subtly different behaviour across units

What does this mean? How is an imperative shell scripts doing something subtly different? Why won't a declarative config file do the same?

Dependency resolution was also a bit of a hack on top of scripts to deal with concepts like run levels.

Runlevels don't really have anything to do with dependency resolution though?

The declarative approach of a proper configuration is a better and more scalable solution.

Maybe it is, but you didn't explain why.

[-] chalk46@fedia.io 4 points 3 months ago* (last edited 3 months ago)

in systemd runlevels are basically just targets (it still sets rc?.d symlinks in /etc akaik) which have services they want and are wanted by, it's the basis for dependency handling plus you get cool security features like syscall filtering, capability limits, user switching, etc

[-] dsemy@lemm.ee 2 points 3 months ago

Well in Void (using runit) each runlevel is just a directory with symlinks to the services.

I didn't realize systemd had these security features (except for user/group switching, which is pretty standard). You can get those with other init systems, but it's probably easier on systemd so I assume more people actually do it. I wonder if average distros take the time to harden their unit files.

[-] stsquad@lemmy.ml 3 points 3 months ago

You can end up with a lot of boiler plate code and with duplication you run the risk that one unit tweaks the boiler plate in a way that behaves differently. This isn't insurmountable and a lot of rc scripts source a library of common functions shared between units. However from the point of view of the executor each unit is it's own whole ball of shell script code.

[-] dsemy@lemm.ee 7 points 3 months ago

Most service scripts on my machine (Void with runit) are less than 10 lines long, and don't contain any "boiler plate" other than a shebang.

this post was submitted on 01 Jan 0001
0 points (NaN% liked)

0 readers
0 users here now

founded a long while ago