Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   systemd.unit    ( 5 )

конфигурация агрегата (Unit configuration)

MAPPING OF UNIT PROPERTIES TO THEIR INVERSES

Unit settings that create a relationship with a second unit
       usually show up in properties of both units, for example in
       systemctl show output. In some cases the name of the property is
       the same as the name of the configuration setting, but not
       always. This table lists the properties that are shown on two
       units which are connected through some dependency, and shows
       which property on "source" unit corresponds to which property on
       the "target" unit.

Table 3. Forward and reverse unit properties ┌──────────────────────┬───────────────────────┬───────────────────────────────┐ │"Forward" "Reverse" Where used │ │property property │ │ ├──────────────────────┼───────────────────────┼───────────────────────────────┤ │Before=After= │ │ ├──────────────────────┼───────────────────────┤ [Unit] section │ │After=Before= │ │ ├──────────────────────┼───────────────────────┼────────────────┬──────────────┤ │Requires=RequiredBy= │ [Unit] section │ [Install] │ │ │ │ │ section │ ├──────────────────────┼───────────────────────┼────────────────┼──────────────┤ │Wants=WantedBy= │ [Unit] section │ [Install] │ │ │ │ │ section │ ├──────────────────────┼───────────────────────┼────────────────┼──────────────┤ │PartOf=ConsistsOf= │ [Unit] section │ an automatic │ │ │ │ │ property │ ├──────────────────────┼───────────────────────┼────────────────┼──────────────┤ │BindsTo=BoundBy= │ [Unit] section │ an automatic │ │ │ │ │ property │ ├──────────────────────┼───────────────────────┼────────────────┼──────────────┤ │Requisite=RequisiteOf= │ [Unit] section │ an automatic │ │ │ │ │ property │ ├──────────────────────┼───────────────────────┼────────────────┴──────────────┤ │Triggers=TriggeredBy= │ Automatic properties, see │ │ │ │ notes below │ ├──────────────────────┼───────────────────────┼────────────────┬──────────────┤ │Conflicts=ConflictedBy= │ [Unit] section │ an automatic │ │ │ │ │ property │ ├──────────────────────┼───────────────────────┼────────────────┴──────────────┤ │PropagatesReloadTo=ReloadPropagatedFrom= │ │ ├──────────────────────┼───────────────────────┤ [Unit] section │ │ReloadPropagatedFrom=PropagatesReloadTo= │ │ ├──────────────────────┼───────────────────────┼────────────────┬──────────────┤ │Following= │ n/a │ An automatic │ │ │ │ │ property │ │ └──────────────────────┴───────────────────────┴────────────────┴──────────────┘

Note: WantedBy= and RequiredBy= are used in the [Install] section to create symlinks in .wants/ and .requires/ directories. They cannot be used directly as a unit configuration setting.

Note: ConsistsOf=, BoundBy=, RequisiteOf=, ConflictedBy= are created implicitly along with their reverses and cannot be specified directly.

Note: Triggers= is created implicitly between a socket, path unit, or an automount unit, and the unit they activate. By default a unit with the same name is triggered, but this can be overridden using Sockets=, Service=, and Unit= settings. See systemd.service(5), systemd.socket(5), systemd.path(5), and systemd.automount(5) for details. TriggeredBy= is created implicitly on the triggered unit.

Note: Following= is used to group device aliases and points to the "primary" device unit that systemd is using to track device state, usually corresponding to a sysfs path. It does not show up in the "target" unit.