It's different than awk because the decision the admin is making ("which init system do I want to run"?) isn't done through alternatives. So you can't use the alternatives system to coordinate swapping all the different bits together.

It seems retty reasonable to me that the systemd maintainers don't want to support systems which are running arbitrary combinations of systemd with alternatives to some parts. And that a package with a Depends on a particular systemd version should be able to depend on features from that version; alternatives would allow an old version of opensysusers to be used instead (unless systemd kept adding conflicts against opensysusers whenever they add a new feature, something I doubt anyone would be happy with).

Strikes me as there is a possible solution, though: have opensysusers dpkg-divert it and put a shell script in its place that checks which init system is running, and exec's the right sysusers based on that. This wouldn't affect systemd-only machines (as opensysusers would not be installed at all), and would do the right thing if someone has installed two init systems to, e.g., consider switching. It'd need to be a script that the systemd maintainers feel reasonably confident will always run systemd's implementation when systemd is running, to avoid the mixed implementations issue.

(Of course, there is the problem with temporarily having no file there... but I suspect that could be documented around as the lesser of evils. Especially if done with --no-rename, so it'd be a very short time.)

Reply via email to