On Fri, Mar 22, 2019 at 06:46:21AM +0200, Mantas Mikulėnas wrote:
> Masking *is* local configuration. It's there so that the admin could
> simulate deleting a unit from /usr, which is considered more-or-less
> read-only; same idea as overriding /usr units in general.
> 
> When you've created your own unit in /etc, there's no point in masking it
> if you can just move the unit file away.

From the perspective of the user running `systemctl mask $foo` where the
service file happens to be is completely out of context.  It should work
uniformly, not break spuriously because the config file is in
/etc/systemd/system.

Not to mention it's absurd to require the user to have to move the
service file somewhere else to accomodate the mask then have ot remember
what convention they used to either rename it to something like
foo.service~ or what directory they stowed the thing in when the time
comes to unmask it.

I'm surprised this requires any debate, nice top post btw.


> 
> On Fri, Mar 22, 2019, 06:15 Vito Caputo <vcap...@pengaru.com> wrote:
> 
> > On Fri, Mar 22, 2019 at 07:06:30AM +0300, Andrei Borzenkov wrote:
> > > 22.03.2019 6:50, Vito Caputo пишет:
> > > > On Thu, Mar 21, 2019 at 08:49:03PM -0700, Vito Caputo wrote:
> > > >> I have a local system unit file at /etc/systemd/system/foo.conf,
> > which I
> > > >> need to mask.
> > > >
> > > > Correction: /etc/systemd/system/foo.service
> > > >
> > > >>
> > > >> However, when I try to mask it systemctl complains:
> > > >>
> > > >>   # systemctl --version
> > > >>   systemd 241 (241.7-2-arch)
> > > >>   +PAM +AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP
> > +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS
> > +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid
> > > >>   # systemctl mask foo
> > > >>   Failed to mask unit: File /etc/systemd/system/foo.service already
> > exists.
> > > >>   #
> > > >>
> > > >> If I need to move foo.service somewhere else, that kind of defeats the
> > > >> point of `systemctl mask` doesn't it?
> > > >>
> > > >> Shouldn't `systemctl mask` work equally well for locally-configured
> > > >> system units?
> > > >>
> > >
> > > Where should symlink be created then?
> >
> > A different directory from the one documented for storing local
> > configuration?
> >
> > Thanks,
> > Vito Caputo
> > _______________________________________________
> > systemd-devel mailing list
> > systemd-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/systemd-devel
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to