Re: [systemd-devel] Condition* options linked by AND if stated more than once
On Thu, 07.08.14 15:09, Peter Mattern (matte...@arcor.de) wrote: First, thank you very much for your quick responses. I had missed the description in man systemd.unit (If any of these options is assigned the empty string, ... at the end of the paragraph about Condition*, right?) and a snippet as posted by Michal works (I had already checked this myself but not posted back yet). So sorry for the noise. What seems odd to me is that all Config* options of a unit in /usr have to appear in the snippet in /etc if it's intended to change only a part of them but leave the others unmodified. But this is for a reason, I guess? Config*? Do you mean Condition*? Yeah, the current behaviour is that we flush out all conditions, and I think this is the right thing to do to keep things simple: if you want to alter the condition something is started on, you shoiuld really be able to do that and change them fully. Or to turn this around: if we wanted to allow changing only specific conditions we'd have to introduce a language that allows to indicate which of the conditions from /usr to precisely replace by which new condition. But such a language addition sounds awfully complex, certainly much more so thatn just allowing a single condition list reset and asking users to then list the full condition set anew... And generally I have the suspicion that people, if they want to change conditions, probably want to change them fully, rather than just pick one line of it and replace it by something else... Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Condition* options linked by AND if stated more than once
If one of these options gets stated more than once the different instances seem to be linked by a logical AND, too. This prevents overwriting these options via snippets in /etc, e. g. systemd-timesyncd.service still won't run in KVM with a snippet /etc/systemd/system/systemd-timesyncd.service.d/do-run-in-kvm.conf stating [Unit] ConditionVirtualization=kvm Seen on Arch Linux, systemd 215-4, tested Condition{Architecure,Host,Virtualization}. Any thoughts? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Condition* options linked by AND if stated more than once
On 07/08/14 12:23, Peter Mattern wrote: If one of these options gets stated more than once the different instances seem to be linked by a logical AND, too. Yes. This is documented in systemd.unit(5), which also describes how a drop-in can reset the list of conditions and start from a clean slate. S ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Condition* options linked by AND if stated more than once
On Thu, Aug 07, 2014 at 01:23:34PM +0200, Peter Mattern wrote: If one of these options gets stated more than once the different instances seem to be linked by a logical AND, too. This prevents overwriting these options via snippets in /etc, e. g. systemd-timesyncd.service still won't run in KVM with a snippet /etc/systemd/system/systemd-timesyncd.service.d/do-run-in-kvm.conf stating [Unit] ConditionVirtualization=kvm What you could do in a snippet is to cancel the previous assignment and define new value for the key. Following should work [Unit] ConditionVirtualization= ConditionVirtualization=kvm Seen on Arch Linux, systemd 215-4, tested Condition{Architecure,Host,Virtualization}. Any thoughts? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Condition* options linked by AND if stated more than once
First, thank you very much for your quick responses. I had missed the description in man systemd.unit (If any of these options is assigned the empty string, ... at the end of the paragraph about Condition*, right?) and a snippet as posted by Michal works (I had already checked this myself but not posted back yet). So sorry for the noise. What seems odd to me is that all Config* options of a unit in /usr have to appear in the snippet in /etc if it's intended to change only a part of them but leave the others unmodified. But this is for a reason, I guess? Regards ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel