Config-Model-Systemd

 view release on metacpan or  search on metacpan

lib/Config/Model/models/Systemd/Section/Unit.pl  view on Meta::CPAN

C<avx2>,
C<bmi2>,
C<rdseed>,
C<adx>,
C<sha_ni>,
C<syscall>,
C<rdtscp>,
C<lm>,
C<lahf_lm>,
C<abm>,
C<constant_tsc>.',
      'ConditionCPUPressure' => 'Verify that the overall system (memory, CPU or IO) pressure is below or equal to a threshold.
This setting takes a threshold value as argument. It can be specified as a simple percentage value,
suffixed with C<%>, in which case the pressure will be measured as an average over the last
five minutes before the attempt to start the unit is performed.
Alternatively, the average timespan can also be specified using C</> as a separator, for
example: C<10%/1min>. The supported timespans match what the kernel provides, and are
limited to C<10sec>, C<1min> and C<5min>. The
C<full> PSI will be checked first, and if not found C<some> will be
checked. For more details, see the documentation on L<PSI (Pressure Stall
Information)|https://docs.kernel.org/accounting/psi.html>.

Optionally, the threshold value can be prefixed with the slice unit under which the pressure will be checked,
followed by a C<:>. If the slice unit is not specified, the overall system pressure will be measured,
instead of a particular cgroup\'s.',
      'ConditionCPUs' => 'Verify that the specified number of CPUs is available to the current system. Takes
a number of CPUs as argument, optionally prefixed with a comparison operator
C<< < >>, C<< <= >>, C<=> (or C<==>),
C<!=> (or C<< <> >>), C<< >= >>,
C<< > >>. Compares the number of CPUs in the CPU affinity mask configured of the
service manager itself with the specified number, adhering to the specified comparison operator. On
physical systems the number of CPUs in the affinity mask of the service manager usually matches the
number of physical CPUs, but in special and virtual environments might differ. In particular, in
containers the affinity mask usually matches the number of CPUs assigned to the container and not
the physically available ones.',
      '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.',
      'ConditionControlGroupController' => 'Check whether given cgroup controllers (e.g. C<cpu>) are available
for use on the system or whether the legacy v1 cgroup or the modern v2 cgroup hierarchy is used.

Multiple controllers may be passed with a space separating them; in this case, the condition
will only pass if all listed controllers are available for use. Controllers unknown to systemd are
ignored. Valid controllers are C<cpu>, C<io>,
C<memory>, and C<pids>. Even if available in the kernel, a
particular controller may not be available if it was disabled on the kernel command line with
C<cgroup_disable=controller>.

Alternatively, two special strings C<v1> and C<v2> may be
specified (without any controller names). C<v2> will pass if the unified v2 cgroup
hierarchy is used, and C<v1> will pass if the legacy v1 hierarchy or the hybrid
hierarchy are used. Note that legacy or hybrid hierarchies have been deprecated. See
L<systemd(1)> for
more information.',
      '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.',
      'ConditionDirectoryNotEmpty' => 'C<ConditionDirectoryNotEmpty> is similar to
C<ConditionPathExists> but verifies that a certain path exists and is a non-empty
directory.',
      'ConditionEnvironment' => "C<ConditionEnvironment> may be used to check whether a specific
environment variable is set (or if prefixed with the exclamation mark \x{2014} 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.",
      'ConditionFileIsExecutable' => 'C<ConditionFileIsExecutable> is similar to
C<ConditionPathExists> but verifies that a certain path exists, is a regular file,
and marked executable.',
      'ConditionFileNotEmpty' => 'C<ConditionFileNotEmpty> is similar to
C<ConditionPathExists> but verifies that a certain path exists and refers to a
regular file with a non-zero size.',
      'ConditionFirmware' => 'Check whether the system\'s firmware is of a certain type. The following values are
possible:',
      'ConditionFirstBoot' => 'Takes a boolean argument. This condition may be used to conditionalize units on
whether the system is booting up for the first time. This roughly means that C</etc/>
was unpopulated when the system started booting (for details, see "First Boot Semantics" in
L<machine-id(5)>).
First Boot is considered finished (this condition will evaluate as false) after the manager
has finished the startup phase.

This condition may be used to populate C</etc/> on the first boot after
factory reset, or when a new system instance boots up for the first time.

Note that the service manager itself will perform setup steps during First Boot: it will
initialize
L<machine-id(5)> and
preset all units, enabling or disabling them according to the
L<systemd.preset(5)>
settings. Additional setup may be performed via units with
C<ConditionFirstBoot=yes>.

For robustness, units with C<ConditionFirstBoot=yes> should order themselves
before C<first-boot-complete.target> and pull in this passive target with
C<Wants>. This ensures that in a case of an aborted first boot, these units will
be re-run during the next system startup.

If the C<systemd.condition_first_boot=> option is specified on the kernel
command line (taking a boolean), it will override the result of this condition check, taking
precedence over C</etc/machine-id> existence checks.',
      'ConditionFraction' => "C<ConditionFraction> may be used to enable a unit on a stable,
pseudo-random subset of a fleet of machines. It is primarily useful for staged rollouts: the same
unit (or drop-in) is distributed to every machine in a fleet, but only the configured fraction of
them will actually have it enabled. The decision is derived locally from the machine ID (see
L<machine-id(5)>), so
it requires no central coordination and is stable over time: a given machine always lands on the
same side of the threshold.

The argument consists of an optional tag followed by a percentage,
separated by whitespace, for example C<30%> or



( run in 0.533 second using v1.01-cache-2.11-cpan-f4a522933cf )