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

Andrei Borzenkov arvidjaar at gmail.com
Sun Dec 7 22:08:04 PST 2014


On Sun, Dec 7, 2014 at 11:27 PM, Martin Pitt <martin.pitt at ubuntu.com> wrote:
> Hello,
>
> Andrei Borzenkov [2014-12-07 14:39 +0300]:
>> > 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.
>> >
>>
>> I think systemctl enable|disable should always create respective links
>> in /etc. It makes it obvious that this is admin decision.
>
> Fully agreed, but that's exactly what I proposed, no?

No quite. Right now "disable" means "delete link"; and I tentatively
think that with proposed scheme "disable" should always create
/dev/null link (or whatever is indication that service is disabled).

>                                                                             Of course it
> always acts on /etc, just the kind of symlink it removes/adds is
> different depending on whether a unit is already enabled by
> /usr/.../wants/foo.service or not.
>
> Martin
> --
> Martin Pitt                        | http://www.piware.de
> Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


More information about the systemd-devel mailing list