[systemd-devel] [PATCH] Set StopWhenUnneeded=no, if unit started manually

Oleksii Shevchuk alxchk at gmail.com
Mon Feb 4 23:40:12 PST 2013


Hi Zbigniew, thanks for reviewing. 

> Even without this patch, the unit would be started, and *then* stopped
> immediately, so it's not true that the user doesn not know if will be
> started. 

Ok, I try to use this analogy. You want to install okular with package
manager. Package manager installs it and it's deps, and then remove it,
beacuse you don't use KDE (%

Yes, actually unit will be started, but immediate stopping doesn't make
this transaction usable. (Btw it eats CPU cycles)

> I mean that if someone doesn't want to have the semantics
> provided by StopWhenUnneeded=true, maybe they should not set it.

Other problem is, that StopWhenUnneeded= is only one way to have units
autoclean, but you cannot fully use it, because of this side effect. 

For example, I use this patch to have firefox, skype, dropbox etc
autoclean when offline, but I want to have the way start such unit when I
need it.

We already have Requisite= to prevent starting units in transaction-less
maner, and RefuseManualStart= to prevent starting units by manual
transactions. 

And according to the manual, there is no any prerequisites to say, that
units will be stopped when StopWhenUnneeded=yes and  when I, the user, Needing in it.

// Wbr, Alex


More information about the systemd-devel mailing list