Re:Porting systemd to musl Libc-powered Linux
by USiBqidmOOkAqRb on Thursday September 05, 2024 @08:02AM
(#41455765)
Yet systemd doesn't have an equivalent to runit's sv once. Also, everything's so opaque that I can't figure out why nftables ruleset isn't loaded on boot, but systemctl restart works correctly (all on Ubuntu 24 server without any kind of frills added).
[ Parent
| on HN ]
Re:Porting systemd to musl Libc-powered Linux
by rascul on Thursday September 05, 2024 @09:01AM
(#41456235)
> Yet systemd doesn't have an equivalent to runit's sv once.
I'm not familiar with runit. Is this approximately equivalent to 'systemctl start service' when service uses the default of Restart=no ?
Re:Porting systemd to musl Libc-powered Linux
by USiBqidmOOkAqRb on Thursday September 05, 2024 @10:29AM
(#41456978)
Yes, but, as the name implies, only once, and selectively at runtime. If you have a service and issue sv once on it, it will not be restarted, but its configuration is not changed so it will run normally after system restart.
Re:Porting systemd to musl Libc-powered Linux
by XorNot on Thursday September 05, 2024 @10:44AM
(#41457125)
That's a one-shot service[1].
RemainAfterExit=yes is what achieves the effect (i.e. if the process terminates it is regarded as still active for system-dependency purposes / status unless you purposefully mark it otherwise).
Re:Porting systemd to musl Libc-powered Linux
by vidarh on Thursday September 05, 2024 @09:02AM
(#41456241)
> Yet systemd doesn't have an equivalent to runit's sv once.
It's a design difference - systemd assumes services know whether they are intended to run once or restart under various conditions. If you want that behaviour it's just a matter of a tweak to the .service file.
> Also, everything's so opaque that I can't figure out why nftables ruleset isn't loaded on boot
Has it been disabled? ("systemctl enable [service name]" will enable it)