| 1 | # | ||
| 2 | # This file is part of Config-Model-Systemd | ||
| 3 | # | ||
| 4 | # This software is Copyright (c) 2008-2026 by Dominique Dumont. | ||
| 5 | # | ||
| 6 | # This is free software, licensed under: | ||
| 7 | # | ||
| 8 | # The GNU Lesser General Public License, Version 2.1, February 1999 | ||
| 9 | # | ||
| 10 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 4 | ▶ | use v5.20; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 4 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | return [ | ||
| 16 | { | ||
| 17 | 3 | 'accept' => [ | |
| 18 | '.*', | ||
| 19 | { | ||
| 20 | 'type' => 'leaf', | ||
| 21 | 'value_type' => 'uniline', | ||
| 22 | 'warn' => 'Unexpected systemd parameter. Please contact cme author to update systemd model.' | ||
| 23 | } | ||
| 24 | ], | ||
| 25 | 'description' => { | ||
| 26 | 'Alias' => 'A space-separated list of additional names this unit shall be installed under. The names listed | ||
| 27 | here must have the same suffix (i.e. type) as the unit filename. This option may be specified more than once, | ||
| 28 | in which case all listed names are used. At installation time, systemctl enable will create | ||
| 29 | symlinks from these names to the unit filename. Note that not all unit types support such alias names, and this | ||
| 30 | setting is not supported for them. Specifically, mount, slice, swap, and automount units do not support | ||
| 31 | aliasing.', | ||
| 32 | 'Also' => 'Additional units to install/deinstall when | ||
| 33 | this unit is installed/deinstalled. If the user requests | ||
| 34 | installation/deinstallation of a unit with this option | ||
| 35 | configured, systemctl enable and | ||
| 36 | systemctl disable will automatically | ||
| 37 | install/uninstall units listed in this option as well. | ||
| 38 | |||
| 39 | This option may be used more than once, or a | ||
| 40 | space-separated list of unit names may be | ||
| 41 | given.', | ||
| 42 | 'DefaultInstance' => 'In template unit files, this specifies for | ||
| 43 | which instance the unit shall be enabled if the template is | ||
| 44 | enabled without any explicitly set instance. This option has | ||
| 45 | no effect in non-template unit files. The specified string | ||
| 46 | must be usable as instance identifier.', | ||
| 47 | 'RequiredBy' => 'This option may be used more than once, or a space-separated list of unit names may | ||
| 48 | be given. A symbolic link is created in the C<.wants/>, C<.requires/>, | ||
| 49 | or C<.upholds/> directory of each of the listed units when this unit is installed | ||
| 50 | by systemctl enable. This has the effect of a dependency of type | ||
| 51 | C<Wants>, C<Requires>, or C<Upholds> being added | ||
| 52 | from the listed unit to the current unit. See the description of the mentioned dependency types | ||
| 53 | in the [Unit] section for details. | ||
| 54 | |||
| 55 | In case of template units listing non template units, the listing unit must have | ||
| 56 | C<DefaultInstance> set, or systemctl enable must be called with | ||
| 57 | an instance name. The instance (default or specified) will be added to the | ||
| 58 | C<.wants/>, C<.requires/>, or C<.upholds/> | ||
| 59 | list of the listed unit. For example, WantedBy=getty.target in a service | ||
| 60 | C<getty@.service> will result in systemctl enable getty@tty2.service | ||
| 61 | creating a C<getty.target.wants/getty@tty2.service> link to | ||
| 62 | C<getty@.service>. This also applies to listing specific instances of templated | ||
| 63 | units: this specific instance will gain the dependency. A template unit may also list a template | ||
| 64 | unit, in which case a generic dependency will be added where each instance of the listing unit will | ||
| 65 | have a dependency on an instance of the listed template with the same instance value. For example, | ||
| 66 | WantedBy=container@.target in a service C<monitor@.service> will | ||
| 67 | result in systemctl enable monitor@.service creating a | ||
| 68 | C<container@.target.wants/monitor@.service> link to | ||
| 69 | C<monitor@.service>, which applies to all instances of | ||
| 70 | C<container@.target>.', | ||
| 71 | 'UpheldBy' => '*RequiredBy', | ||
| 72 | 'WantedBy' => '*RequiredBy' | ||
| 73 | }, | ||
| 74 | 'element' => [ | ||
| 75 | 'Alias', | ||
| 76 | { | ||
| 77 | 'cargo' => { | ||
| 78 | 'type' => 'leaf', | ||
| 79 | 'value_type' => 'uniline' | ||
| 80 | }, | ||
| 81 | 'type' => 'list' | ||
| 82 | }, | ||
| 83 | 'WantedBy', | ||
| 84 | '*Alias', | ||
| 85 | 'RequiredBy', | ||
| 86 | '*Alias', | ||
| 87 | 'UpheldBy', | ||
| 88 | '*Alias', | ||
| 89 | 'Also', | ||
| 90 | '*Alias', | ||
| 91 | 'DefaultInstance', | ||
| 92 | { | ||
| 93 | 'type' => 'leaf', | ||
| 94 | 'value_type' => 'uniline' | ||
| 95 | } | ||
| 96 | ], | ||
| 97 | 'generated_by' => 'parseman.pl from systemd doc', | ||
| 98 | 'name' => 'Systemd::Section::Install' | ||
| 99 | } | ||
| 100 | ] | ||
| 101 | ; | ||