Config-Model-Systemd

 view release on metacpan or  search on metacpan

lib/Config/Model/models/Systemd/Section/TimerUnit.pod  view on Meta::CPAN

by prepending an exclamation mark. I< Optional. Type list of uniline.  > 

=head2 ConditionHost

C<ConditionHost> may be used to match against the hostname,
machine ID, boot ID or product UUID of the host. This either takes a hostname string (optionally
with shell style globs) which is tested against the locally set hostname as returned by
L<gethostname(2)>, or
a 128bit ID or UUID, formatted as string. The latter is compared against machine ID, boot ID and the
firmware product UUID if there is any. See
L<machine-id(5)> for
details about the machine ID. The test may be negated by prepending an exclamation mark. I< Optional. Type list of uniline.  > 

=head2 ConditionKernelCommandLine

C<ConditionKernelCommandLine> may be used to check whether a
specific kernel command line option is set (or if prefixed with the exclamation mark — unset). The
argument must either be a single word, or an assignment (i.e. two words, separated by
C<=>). In the former case the kernel command line is searched for the word
appearing as is, or as left hand side of an assignment. In the latter case, the exact assignment is
looked for with right and left hand side matching. This operates on the kernel command line
communicated to userspace via C</proc/cmdline>, except when the service manager
is invoked as payload of a container manager, in which case the command line of C<PID
1> is used instead (i.e. C</proc/1/cmdline>). I< Optional. Type list of uniline.  > 

=head2 ConditionKernelVersion

C<ConditionKernelVersion> may be used to check whether the kernel
version (as reported by uname -r) matches a certain expression, or if prefixed
with the exclamation mark, does not match. The argument must be a list of (potentially quoted)
expressions. Each expression starts with one of C<=> or C<!=> for
string comparisons, C<< < >>, C<< <= >>, C<==>,
C<< <> >>, C<< >= >>, C<< > >> for version
comparisons, or C<$=>, C<!$=> for a shell-style glob match. If no
operator is specified, C<$=> is implied.

Note that using the kernel version string is an unreliable way to determine which features
are supported by a kernel, because of the widespread practice of backporting drivers, features, and
fixes from newer upstream kernels into older versions provided by distributions. Hence, this check
is inherently unportable and should not be used for units which may be used on different
distributions. I< Optional. Type list of uniline.  > 

=head2 ConditionVersion

C<ConditionVersion> may be used to check whether a software
version matches a certain expression, or if prefixed with the exclamation mark, does not match.
The first argument is the software whose version has to be checked. Currently
C<kernel>, C<systemd> and C<glibc> are supported.
If this argument is omitted, C<kernel> is implied. The second argument must be a
list of (potentially quoted) expressions. Each expression starts with one of C<=>
or C<!=> for string comparisons, C<< < >>, C<< <= >>,
C<==>, C<< <> >>, C<< >= >>,
C<< > >> for version comparisons, or C<$=>, C<!$=>
for a shell-style glob match. If no operator is specified, C<$=> is implied. I< Optional. Type list of uniline.  > 

=head2 ConditionCredential

C<ConditionCredential> may be used to check whether a credential
by the specified name was passed into the service manager. See L<System and Service
Credentials|https://systemd.io/CREDENTIALS> for details about
credentials. If used in services for the system service manager this may be used to conditionalize
services based on system credentials passed in. If used in services for the per-user service
manager this may be used to conditionalize services based on credentials passed into the
C<unit@.service> service instance belonging to the user. The argument must be a
valid credential name. I< Optional. Type list of uniline.  > 

=head2 ConditionEnvironment

C<ConditionEnvironment> may be used to check whether a specific
environment variable is set (or if prefixed with the exclamation mark — unset) in the service
manager's environment block.
The argument may be a single word, to check if the variable with this name is defined in the
environment block, or an assignment
(C<name=value>), to check if
the variable with this exact value is defined. Note that the environment block of the service
manager itself is checked, i.e. not any variables defined with C<Environment> or
C<EnvironmentFile>, as described above. This is particularly useful when the
service manager runs inside a containerized environment or as per-user service manager, in order to
check for variables passed in by the enclosing container manager or PAM. I< Optional. Type list of uniline.  > 

=head2 ConditionSecurity

C<ConditionSecurity> may be used to check whether the given
security technology is enabled on the system. Currently, the following values are recognized:

The test may be negated by prepending an exclamation mark. I< Optional. Type list of uniline.  > 

=head2 ConditionCapability

Check whether the given capability exists in the capability bounding set of the
service manager (i.e. this does not check whether capability is actually available in the permitted
or effective sets, see
L<capabilities(7)>
for details). Pass a capability name such as C<CAP_MKNOD>, possibly prefixed with
an exclamation mark to negate the check. I< Optional. Type list of uniline.  > 

=head2 ConditionACPower

Check whether the system has AC power, or is exclusively battery powered at the
time of activation of the unit. This takes a boolean argument. If set to C<true>,
the condition will hold only if at least one AC connector of the system is connected to a power
source, or if no AC connectors are known. Conversely, if set to C<false>, the
condition will hold only if there is at least one AC connector known and all AC connectors are
disconnected from a power source. I< Optional. Type list of uniline.  > 

=head2 ConditionNeedsUpdate

Takes one of C</var/> or C</etc/> as argument,
possibly prefixed with a C<!> (to invert the condition). This condition may be
used to conditionalize units on whether the specified directory requires an update because
C</usr/>'s modification time is newer than the stamp file
C<.updated> in the specified directory. This is useful to implement offline
updates of the vendor operating system resources in C</usr/> that require updating
of C</etc/> or C</var/> on the next following boot. Units making
use of this condition should order themselves before
L<systemd-update-done.service(8)>,
to make sure they run before the stamp file's modification time gets reset indicating a completed
update.

If the C<systemd.condition_needs_update=> option is specified on the kernel
command line (taking a boolean), it will override the result of this condition check, taking
precedence over any file modification time checks. If the kernel command line option is used,
C<systemd-update-done.service> will not have immediate effect on any following



( run in 0.786 second using v1.01-cache-2.11-cpan-39bf76dae61 )