[Freeipa-devel] Should mask/unmask be part of disabling/enabling services in systemd?
Martin Basti
mbasti at redhat.com
Thu Oct 9 10:56:15 UTC 2014
On 22/09/14 09:52, Jan Cholasta wrote:
> Dne 19.9.2014 v 17:23 Rob Crittenden napsal(a):
>> Martin Basti wrote:
>>> Hello list,
>>>
>>> I need to use systemd mask/unmask in ipa service.
>>>
>>> But as Honza wrote:
>>> "IMO masking/unmasking should be part of disabling/enabling a
>>> service in
>>> systemd. AFAIK in most other init systems when you disable a
>>> service, it
>>> has the same effect as masking the service in systemd - it will
>>> never be
>>> started until it is enabled/unmasked again. "
>>>
>>> So my questions is, should be masking part of disabling service in
>>> systemd, to be platform independent?
>>> Or should we add mask/unmask methods to
>>> ipaplatform.base.services.PlatformService where mask is alias for
>>> disable?
>>>
>>> Martin^2
>>>
>>
>> After reading http://0pointer.de/blog/projects/three-levels-of-off I
>> disagree that disabling in SysV is the same as masking in systemd,
>> though I guess it depends on the meaning of disable. According to that
>> page chkconfig off <service> is equivalent to systemctl disable
>> <service>.service, which is what we do now AFAIR.
>
> I don't think that's entirely correct. They are equivalent
> mechanically (a symlink is added/removed when a service is
> enabled/disabled), but effectively they are different. AFAIK in SysV,
> services can be started either manually or automatically on boot and
> if you disable a service the only way it will start is when you do it
> manually. In systemd, there are more ways services can be started
> automatically (socket, D-Bus, etc.) and disabling a service will only
> disable automatic start *on boot*, but it can still be started
> automatically, which contrasts with what SysV does.
>
>>
>> Why do you need to mask a service, e.g. render it completely
>> unstartable?
>>
>> rob
>>
>
>
Let's continue with discussion,
1) should we add general method mask/unmask to ipaplatform, or
2) make mask/unmask part of enabling/disabling in systemd
Martin^2
--
Martin Basti
More information about the Freeipa-devel
mailing list