From d45679c137a64ea989fbd189d52bf9bfc4f7fe6d Mon Sep 17 00:00:00 2001
From: Laurent Bercot
@@ -115,7 +115,9 @@ s6-rc source format will make it easy on those tools.
indubitably easier to do in other languages than C), and want to write
a program that takes a text file, parses it and outputs a service
definition directory in the s6-rc-compile source format, it should also be
-rather easy - please, feel free!
+rather easy - please, feel free! (There are talks in the community of an
+initiative to design a common declarative syntax for service files, with
+backends for OpenRC, s6-rc, and systemd. It may happen at some point.)
The source format for
-s6-rc-compile is not very convenient.
+s6-rc-compile is not very convenient.
Why not put all the information for a service in a single file ?
There are no "Provides:", no virtual services. What do I do
@@ -184,14 +186,14 @@ according to your preferences, but keep the same idea)
-
- s6-rc-compile /etc/s6-rc/compiled-initial /etc/s6-rc/source-initial
- ln -sf compiled-initial /etc/s6-rc/compiled
+ s6-rc-compile /etc/s6-rc/compiled/initial /etc/s6-rc/source-initial
+ ln -sf initial /etc/s6-rc/compiled/current
stamp=`s6-clock`
- s6-rc-compile /etc/s6-rc/compiled-$stamp /etc/s6-rc/source-current
+ s6-rc-compile /etc/s6-rc/compiled/$stamp /etc/s6-rc/source-current
- s6-rc-update /etc/s6-rc/compiled-$stamp
+ s6-rc-update /etc/s6-rc/compiled/$stamp
- olddb=`s6-linkname -f /etc/s6-rc/compiled`
- s6-ln -nsf compiled-$stamp /etc/s6-rc/compiled
+ olddb=`s6-linkname -f /etc/s6-rc/compiled/current`
+ s6-ln -nsf $stamp /etc/s6-rc/compiled/current
The use of the
s6-ln
@@ -223,24 +225,23 @@ utility is recommended, because the
ln
standard actually forbids an atomic replacement, so utilities that
follow it to the letter, for instance, ln from GNU coreutils, cannot
-be atomic: they first remove the old link, then create the new one. If you
-do not have
-s6-ln,
-you need to perform an unintuitive workaround to get POSIX-compliant tools to
-do the right thing:
- ln -sf compiled-$stamp /etc/s6-rc/compiled/compiled &&
-mv -f /etc/s6-rc/compiled/compiled /etc/s6-rc
rm -rf $olddb
Switching from another service manager
@@ -443,5 +444,11 @@ requires adaptation and more work for the admin to use OpenRC outside of
that frame.
+s6-frontend makes s6-rc +more accessible, but does not provide policy files either. Work is underway +on a policy package that will provide a turnkey bootable s6 ecosystem. +
+