[Pkg-systemd-maintainers] Bug#719695: Bug#719695: Bug#719695: Bug#719695: Prefer symlinks over Alias= for non-matching service names

Michael Stapelberg stapelberg at debian.org
Sun Mar 2 01:08:58 GMT 2014


[+cc lennart]

Hi Michael,

Michael Biebl <biebl at debian.org> writes:
>>> Maybe we could convince Lennart to allow that.
>> AFAIR, I read that you made some progress with Lennart on this. Could
>> you update this bug accordingly please? Thanks.
>
> [19:50:51] <poettering> mbiebl: so, i'd be fine with allowing
> enable/disable to follow symlinks in /usr/lib before starting to do its
> thing
> [19:50:59] <poettering> mbiebl: however, i am strictly against following
> them through /etc
> [19:51:17] <poettering> mbiebl: because symlinks /etc is the stuff the
> tool manages after all
> [19:51:22] <mbiebl> nod
> [19:51:25] <poettering> mbiebl: and it shouldn't get confused by its own
> doings
> [19:51:30] <mbiebl> it would be for static symlinks only
> [19:52:01] <poettering> so, the current logic simply skips all symlinks,
> and i'd be happy to change that to skip only the symlinks in /etc, /run,
> and so on
Alright. After an eternity, I decided to have a look at this issue
again. When creating /lib/systemd/system/rsync-alias.service →
rsync.service, with the attached patch I can enable/disable the service:

midna $ sudo systemctl status rsync-alias.service      
rsync.service - fast remote file copy program daemon                           
   Loaded: loaded (/lib/systemd/system/rsync.service; enabled)
   Active: inactive (dead)
          start condition failed at Sun 2014-03-02 01:39:20 CET; 23min ago

Mar 02 01:39:20 midna systemd[1]: Started fast remote file copy program daemon.

midna $ sudo systemctl disable rsync-alias.service
rm '/etc/systemd/system/multi-user.target.wants/rsync.service'

midna $ sudo systemctl status rsync-alias.service
rsync.service - fast remote file copy program daemon
   Loaded: loaded (/lib/systemd/system/rsync.service; disabled)
   Active: inactive (dead)

Mar 02 01:39:20 midna systemd[1]: Started fast remote file copy program daemon.

midna $ sudo systemctl enable rsync-alias.service
ln -s '/lib/systemd/system/rsync.service' '/etc/systemd/system/multi-user.target.wants/rsync.service'

midna $ sudo systemctl status rsync-alias.service
rsync.service - fast remote file copy program daemon
   Loaded: loaded (/lib/systemd/system/rsync.service; enabled)
   Active: inactive (dead)

Mar 02 01:39:20 midna systemd[1]: Started fast remote file copy program daemon.

However, mask and unmask are still using rsync-alias.service, not
rsync.service.

Lennart, does the patch look good to you so far? Or are we on the wrong
path entirely?

Which other systemctl verbs will need special casing apart from
enable|disable|mask|unmask?

Thanks.

PS: If you wanted to take this patch and hack this feature in, I
definitely wouldn’t mind :-).

-- 
Best regards,
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: follow-symlinks-in-lib.patch
Type: text/x-diff
Size: 2359 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20140302/0634a3f3/attachment-0002.patch>


More information about the Pkg-systemd-maintainers mailing list