[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#947847: please install systemd-sysusers using update-alternatives



On Mon, 2020-01-27 at 11:01 -0500, Anthony DeRobertis wrote:
> 
> 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.

It is as simple as:
if ps -p1|grep -q "systemd"; then
 <install systemd-{sysusers,tmpfiles]>
else
 <install open{sysusers,tmpfiles}>
fi

> 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.




Reply to: