Difference: SystemdDocs (3 vs. 4)

Revision 42014-10-16 - ascobie

Line: 1 to 1
 
META TOPICPARENT name="SL7PortHome"
Added:
>
>

LCFG systemd documentation

 

Introduction

Systemd has units (kind of equivalent to sysv init scripts) :-

Line: 35 to 39
 
    • ExecStopPost - command to call after executing command specifed by ExecStop
    • EnvironmentFile - a file containing environment variables to be set before running above commands
Added:
>
>

Systemd directory structure

/usr/lib/systemd/system
a directory of available units. Each unit can have a directory {unit}.wants and a directory {unit}.requires : these directories have links to other units that are wanted or required by the unit. These files are shipped by RPM and are considered read-only.
/etc/systemd/system
this directory is writeable and is overlaid on top of /usr/lib/systemd/system. It is used to override unit files in /usr/lib/systemd/system. It is also used to create local unit files (eg for LCFG). As with /usr/lib/systemd/system, each unit can have a {unit}.wants and {unit}.requires directory : if a unit has one of these directories in both the /usr and /etc trees, the union of both directories is used.

Note that a system with an empty /etc/systemd/system directory should boot correctly.

 

Macros

REGISTER_COMPONENT_WITH_SYSTEMD(COMP,REQUIRES,AFTER,WANTEDBYTAG)
creates a one-shot service unit to start component LCFG component COMP. REQUIRES - units that this component requires to run (optional). AFTER - units that should be started before this component (optional). WANTEDBYTAG - the tag of the unit that this component is wanted by (required). WANTEDBYTAG should be set to 'lcfgmultiuser' if it has the capability to ask for a reboot, or is required by components that may ask for a reboot. It should be set to 'multiusertarget' if it should not be started until after any boot-time reboots have been completed (eg getty, gdm, apacheconf etc).
Line: 52 to 63
 
  • multi-user.target (as end ‘default’ target)
    • lcfg-multi-user-stable.target
      • lcfg-multi-user.target
Changed:
<
<
        • lcfg-auth.service
        • lcfg-client.service
>
>
        • lcfg-auth.service (after network.target)
        • lcfg-client.service (after network.target)
 
Changed:
<
<
        • lcfg-updaterpms.service
>
>
        • lcfg-updaterpms.service (after network.target)
 
      • lcfg-rebootcheck.service (after lcfg-multi-user.target)
    • lcfg-clearbootctx.service (after lcfg-multi-user-stable.target)
    • lcfg-cron.service (after lcfg-multi-user-stable.target)
Line: 63 to 74
 
    • lcfg-openssh.service (after lcfg-multi-user-stable.target)
    • getty.service (after lcfg-multi-user-stable.target)
Changed:
<
<

Schema

>
>
This SVG file shows the dependencies between targets and LCFG services, pruned at basic.target. You can use inkscape to display this file.
 
Added:
>
>

Schema

  -- Main.ascobie - 2014-08-19
Added:
>
>

META FILEATTACHMENT attachment="systemd-lcfg.svg" attr="h" comment="" date="1413459994" name="systemd-lcfg.svg" path="systemd-lcfg.svg" size="180544" user="ascobie" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback