3 ms·
There are still some weird things/choices in its design I don't fully understand. For example, why do unit definitions have to be actual files on disk? Then, a
by sureglymop 4mo ago
There are still some weird things/choices in its design I don't fully understand.
For example, why do unit definitions have to be actual files on disk? Then, all of these files are reloaded when the daemon reloads, not just changed ones. But, why couldn't there be an API letting me add units programmatically? (There kind of is but it's constrained/inflexible)
Or, why can't I declare multiple units in the same file? It's really designed around the filesystem instead of abstracting at a different level, which is a choice I don't think is smart. It's not like it follows the unix philosophy though.
As for the format used for unit definitions, I wish TOML had been around so they could have had something sensible...
- paulddraper 4mo agoYou can add units programmatically. Google it!
- paulddraper 4mo agoDownvoting makes no sense. https://www.google.com/search?q=systemd+add+units+programmatically https://www.google.com/search?q=systemd+add+units+programmat... You can do it either via the CLI (systemd-run), or via the D-Bus API (StartTransientUnit).
- paulddraper 4mo agoPS There's even systemd.generator for a hybrid approach. SystemD has no dearth of programmable options.
- sureglymop 4mo agoI didnt downvote and I appreciated your reply. Just to let you know :) I have tried available options including generators.
- lanycrost 4mo agoit's so, but overall linux is not following linux philosophy in many other places, and do it far before systemd. Many tools even running under unix not doing so like gcc, x.org, etc.