On Mon, Jan 27, 2020 at 06:16:14PM +0100, Svante Signell wrote:
> It is as simple as:
> if ps -p1|grep -q "systemd"; then

This is not the correct way to detect whether systemd is the current
init system. You want:

if test -d /run/systemd/system; then

See https://www.freedesktop.org/software/systemd/man/sd_booted.html

>  <install systemd-{sysusers,tmpfiles]>
> else
>  <install open{sysusers,tmpfiles}>
> fi

"exec", not "install".

- Josh Triplett

Reply via email to