[systemd-devel] /usr vs /etc for default distro units enablement
Lennart Poettering
lennart at poettering.net
Mon Dec 8 06:32:03 PST 2014
On Sun, 07.12.14 09:39, Martin Pitt (martin.pitt at ubuntu.com) wrote:
> Hello all,
>
> sorry for the late response.
>
> Andrei Borzenkov [2014-12-05 10:58 +0300]:
> > That's not how I actually understood it. enable/disable still applies
> > only to units with [Install] section as it is now. Just that
>
> Correct. I don't see any need to change the behaviour of static units,
> and I don't want to change the "visible effect" of systemctl/disable,
> nor the current semantics of changing wants/ symlinks in /etc.
>
> > unit foo.service is disabled if
> > [...[
> > 2. There are no links from [Install] in /usr/lib or /etc *OR* there are
> > links in /usr/lib which are masked in /etc.
>
> Indeed the part after the "OR" is the only change that I propose. I. e.
>
> - systemctl enable: If /usr/.../wants/foo.service exists, remove the
> /dev/null symlink in /etc/.../wants/foo.service if it exists (if
> not, it's already enabled). Otherwise, behave as now.
>
> - systemctl disable: If /usr/.../wants/foo.service exists, create a
> /dev/null symlink in /etc/.../wants/foo.service if it doesn't exist
> yet (if it does, it's already disabled). Otherwise, behave as now.
Sounds OK, would merge a good patch for this.
Thanks,
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list