diff options
author | Laurent Bercot <ska-adelie@skarnet.org> | 2018-08-14 19:52:39 +0000 |
---|---|---|
committer | Laurent Bercot <ska-adelie@skarnet.org> | 2018-08-15 15:12:16 +0000 |
commit | afb0fe3ccead10a3a68f938e80c891fe9d9cb9d3 (patch) | |
tree | b5809b8e852347718303fa2c93a5bc0c2eb07bfc /system/utmps/utmps.initd | |
parent | cdbdb41c2da9c3185122be33fdef720f7d9f0883 (diff) | |
download | packages-afb0fe3ccead10a3a68f938e80c891fe9d9cb9d3.tar.gz packages-afb0fe3ccead10a3a68f938e80c891fe9d9cb9d3.tar.bz2 packages-afb0fe3ccead10a3a68f938e80c891fe9d9cb9d3.tar.xz packages-afb0fe3ccead10a3a68f938e80c891fe9d9cb9d3.zip |
Move s6 higher in the supervision chain
- Better s6 layout, with a place for early services and a
place for packages to add their services later on.
- s6-svscan is now supervised by sysvinit (instead of being
run once by openrc)
- s6-svscan is now the only process supervised by sysvinit.
All the other "respawn" lines are delegated to s6.
- utmpd and wtmpd are now early services instead of being
added by openrc.
These changes implement a full supervision architecture and
make init more flexible. Later on, it will be easier to
- add conditional gettys (for /dev/hvc0...)
- remove sysvinit entirely
- decouple the init process from the service manager.
Diffstat (limited to 'system/utmps/utmps.initd')
-rw-r--r-- | system/utmps/utmps.initd | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/system/utmps/utmps.initd b/system/utmps/utmps.initd deleted file mode 100644 index db4570031..000000000 --- a/system/utmps/utmps.initd +++ /dev/null @@ -1,32 +0,0 @@ -#!/sbin/openrc-run -# Copyright 2018 Laurent Bercot -# Distributed under the terms of the ISC License. -# -# OpenRC is only used here to trigger the s6 mechanisms. - -depend() { - need s6 -} - -start() { - ebegin "Starting utmpd and wtmpd services" - mkdir -p -m 0755 /run/utmps - chown utmp:utmp /run/utmps - - # OpenRC has no readiness notification framework, so it can run this before s6 is ready. - # To avoid the race (yes, I have hit it), do a polling check here. - # If you want to avoid unnecessary delays, switch to a real service manager like s6-rc. - until test -e /run/service/.s6-svscan/control ; do sleep 1 ; done - - ln -nsf /var/lib/utmps/services/utmpd /run/service/utmpd - ln -nsf /var/lib/utmps/services/wtmpd /run/service/wtmpd - s6-svlisten -U -t 5000 -- /var/lib/utmps/services/utmpd /var/lib/utmps/services/wtmpd "" s6-svscanctl -an /run/service - eend $? -} - -stop() { - ebegin "Stopping utmpd and wtmpd services" - rm -f /run/service/utmpd /run/service/wtmpd - s6-svlisten -d -t 5000 -- /var/lib/utmps/services/utmpd /var/lib/utmps/services/wtmpd "" s6-svscanctl -an /run/service - eend $? -} |