Re: Q: ConditionPathExists=

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Am 04.06.19 um 13:32 schrieb Ulrich Windl:
> Hi!
> 
> I have a question for ConditionPathExists:
> If I specify two files like "ConditionPathExists=/etc/idredir.conf /etc/isredir.conf", I get a "start condition failed" even if both files exist.

why don't you just use

ConditionPathExists=/etc/idredir.conf
ConditionPathExists=/etc/isredir.conf

> There's also some confusion where exactly a pipe sysmbol has to be placed:
>            If multiple conditions are specified, the unit will be executed if
>            all of them apply (i.e. a logical AND is applied). Condition checks
>            can be prefixed with a pipe symbol (|) in which case a condition
>            becomes a triggering condition. If at least one triggering
> 
> Do I have to write "|ConditionPathExists=..." or "ConditionPathExists=|..."

ConditionPathExists=|

did you stop to read where you stoped o quote: "If at least one
triggering condition is defined for a unit, then the unit will be
executed if at least one of the triggering conditions apply and all of
the non-triggering conditions"

it's the same logic like ReadOnlyPath=-/whatever to avoid failing if the
path don't exist and make a readonly namespace in case it exists

| or - before an option make sno sense ina INI-syle cofnig
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux