[systemd-devel] EnableUnitFiles / DisableUnitFiles

Chris Trobridge christrobridge at hotmail.com
Wed May 3 18:53:39 UTC 2017


> From: Lennart Poettering <lennart at poettering.net>
> Sent: 03 May 2017 14:45
> To: Chris Trobridge
> Cc: systemd-devel at lists.freedesktop.org
> Subject: Re: [systemd-devel] EnableUnitFiles / DisableUnitFiles
>     
> On Tue, 02.05.17 08:38, Chris Trobridge (christrobridge at hotmail.com) wrote:
> 1;4601;0c
> > Using 230/231:
> > 
> > 
> > I just switched from using the systemd Unit interface to control services via dbus to using the systemd Manager interface so that I could control access via polkit-1.
> > 
> > 
> > Using EnableUnitFiles and DisableUnitFiles, I noticed the expected changes to symlinks were being made but the unit file status (systemctl status, dbus) was not changing.
> > 
> > 
> > Reloading the units files with systemctl reload-daemon or  dbus Manager Reload method cause the unit file state to update.
> > 
> > 
> > I don't know whether this is expected behaviour or not but I didn't find it obvious from the documentation so I am putting this out in case it helps anyone.
> 
> This is expected behaviour, and permits you to make multiple changes
> that are then put into effect in one go (though it still won't be full
> transaction scheme). "systemctl enable" will always implicitly follow
> all changes by a reload, exept if you specify --no-reload.
> 
> Lennart

Thanks Lennart, that's what I thought was most likely, and I've already taken advantage of this to enable several units before reloading.

Cheers,
Chris


More information about the systemd-devel mailing list