[Bug 237760] sysutils/s6-rc: Allow overriding livedir

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon May 6 09:19:59 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237760

--- Comment #3 from dewayne at heuristicsystems.com.au ---
(In reply to Kubilay Kocak from comment #1)
Oops - I missed a question.

Defaulting to /var/run wouldn't be the best idea.  As the s6-rc system requires
four directory trees to function ( source files; compiledir; livedir; scandir),
comprising:
1. Your source files, I've placed mine in /usr/local/etc/s6 
2. A target directory for the "compiled" source files is created (as an
argument to the s6-rc-compile program).  Compiled in the sense that the source
files are scanned for things like application dependencies, bundles of
applications, etc, and the supporting "scandirectory" describes this
architecture.
3. Upon initialisation, the compiled tree is copied to the "livedir" where
setting some configuration files (essentially saying applications are down ie
"not started")
4. The essence of service management is performed by the s6 port which manages
the service supervisors via the final "scandir" - its essentially a bunch of
softlinks to livedir.  

Once this is done, the serivces are managed by signal interrupts and its
actually a lot of fun.  The buik of the work is in constructing the scripts to
run and finish or crash things. 

So putting this into /var/run may not be the best, /var/db may be better but I
took the approach of creating a  mfs (from fstab)
rw,noatime,async,-s10m,-b8192,-f2048,-S,-n where I place the compiledir,
livedir and scandir.  Which works very well, there are many small files here
(and may be frequently accessed).

The one change to the s6-rc/Makefile that I'd suggest is to use
/usr/local/etc/s6 as the FreeBSD way of storing what are essentially config
files that describe how to run/finish/contents/type/...  things to the system. 
Unfortunately there is no configuration option in the s6-rc distribution, so
creating such a directory could be included in the Makefile.

I hope that this helps.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list