[systemd-devel] StopWhenUnneeded and Templated install paches

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Tue Jan 29 17:00:58 PST 2013


On Wed, Jan 16, 2013 at 02:36:14PM +0200, Oleksii Shevchuk wrote:
> Hi list!
> 
> First patch removes StopWhenUnneeded= when service starts, if service  will be stopped after start, because WantedBy=,RequiredBy,.. is empty.
> 
> Second one allows templated enable, like:
> 
>  > grep WantedBy ~/.config/systemd/user/mpop at .timer           
> WantedBy=services@%i.target
> 
> > srv disable mpop at iit.timer
> rm '/home/alxchk/.config/systemd/user/services at iit.target.wants/mpop at iit.timer'
> alxchk > srv enable mpop at iit.timer       
> ln -s '/home/alxchk/.config/systemd/user/mpop at .timer' '/home/alxchk/.config/systemd/user/services at iit.target.wants/mpop at iit.timer'

Hi Oleksii,

I now commited some patches which implement basically the same
functionality as the second patch, but with a completely different
implementation. My version mirrors the existing specifier
implementation for loaded units and provides callback methods for
different specifiers which compute requested value when needed. I also
added more specifiers (%u, %U, %H, %m, %b, %N, %n). Please check that
the new version serves your usecase.

Regarding the first patch: I think that this could be a good
idea... But the description is scant, and I'm not sure if correctly
guess the intended scope. Could you provide a complete patch with
full rationale? One specific question is how this change is affected
by daemon-reload and daemon-reexec? Aren't the setting lost then?

(Btw., in the future, plese use git formatted patches
as separate mails, this makes applying them _much_ nicer.)

Thanks,
Zbyszek


More information about the systemd-devel mailing list