Introduction

Systemd has units :-

  • service - manage daemons - start/stop/reload/restart
  • socket - lazy start - each socket has matching service which is started on first connection to socket (like xinetd)
  • target - does nothing - used to group other units to provide a 'sync' point during boot
  • device, mount, automount, slice ... - not covered here

Each unit Y can have dependencies :-

  • Y wants X - Y will 'pull-in' X, but won't fail if X fails to start for any reason
  • Y requires X - as for 'wants X', but Y will fail if X fails to start
  • Y after X / Y before X

All units started together unless order defined :-

  • order is orthagonal to dependencies

Service units

  • service units have one of the following 'type' :-
    • simple - specified command runs in foreground
    • forking - forks a child and exits
    • oneshot - one shot task and exits
    • notify - linked against systemd's sd_notify()

Macros

LCFG_SYSTEMD_UNIT(TAG, RN, LINK)

LCFG_SYSTEMD_UNIT_WANTEDBY(TAG,RN,LINK,WANT)

LCFG_SYSTEMD_WANTS(TAG,RN,WANTS)

LCFG_SYSTEMD_REQUIRES(TAG,RN,REQUIRES)

REGISTER_COMPONENT_WITH_SYSTEMD(COMP,REQUIRES,AFTER,WANTEDBY)

Schema

-- Main.ascobie - 2014-08-19

Edit | Attach | Print version | History: r15 | r4 < r3 < r2 < r1 | Backlinks | Raw View | More topic actions...
Topic revision: r2 - 2014-10-14 - ascobie
 
  • Edit
  • Attach
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