[systemd-devel] /usr vs /etc for default distro units enablement

Michael Biebl mbiebl at gmail.com
Tue Nov 18 07:55:27 PST 2014


2014-11-18 16:30 GMT+01:00 Colin Guthrie <gmane at colin.guthr.ie>:
> Michael Biebl wrote on 18/11/14 15:09:
>> 2014-11-18 15:59 GMT+01:00 Colin Guthrie <gmane at colin.guthr.ie>:
>>> Didier Roche wrote on 18/11/14 13:58:
>>>> This would be maybe a nice way for the admin to know what's coming from
>>>> a distribution default or not. However, let's say I want to ensure that
>>>> ssh will always be available on my server, I would (even if it's in my
>>>> server preset) then systemctl enable openssh, no matter whatever future
>>>> preset updates does (like disable it in the next batch upgrade).
>>>
>>> For the avoidance of doubt, I believe that running systemctl preset
>>> should only ever happen on *first* install, never on upgrade or such like.
>>>
>>
>> And what are you going to do, if the unit file changes?
>> Say v1  had
>>
>> [Install]
>> WantedBy=multi-user.target
>>
>> and version B has
>> [Install]
>> WantedBy=foo.target
>
>
> Well this is an edge case I'm sure you'll agree.

Actually, in the short period of time (and with the currently still
low number of packages shipping native units) in Debian, this happened
more often then I'd have expected.

So I think we should have a better answer then just saying this is an edge case.

> Ultimately, with this case, doing the preset is wrong anyway. You don't
> want the distro choice, you want the "what the user had" choice.

You only want to preservce the user choice, if it deviated from the
distro choice. Otherwise the package state should be updated to
reflect the latest distro choice.

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


More information about the systemd-devel mailing list