The prepare-svscan program
prepare-svscan does generic preparation of the supervision tree. It is also used in system-init and user-init.
Interface
prepare-svscan workingdir rundir bundle prog...
-
prepare-svscan sets its standard input to
/dev/null. -
It sets the umask to
0022. -
It creates the directory
rundir. -
It copies all contents of
workingdir/run-image/.torundir/. -
It changes its standard output to
rundir/service/s6-svscan-log/fifo. -
prepare-svscan then forks a background process that:
-
waits for a reading end at
rundir/service/s6-svscan-log/fifo. -
Once the above is given, if
rundir/s6-rcdoes not exist, -
it initiates s6-rc on
rundir/serviceusing s6-rc-init and starts the bundlebundleusing s6-rc.
-
waits for a reading end at
- It copies stderr to stdout.
-
If available, the directory
workingdir/envis sourced using s6-env. -
prepare-svscan executest into
prog..., which is usually directly or indirectly s6-svscan.
Once s6-svscan is launched it will start an
s6-supervise
process on rundir/service/s6-svscan-log which starts
s6-log reading
from rundir/service/s6-svscan-log/fifo.
This in turn triggers the forked background process to continue with its second step.
Exit codes
- prepare-svscan usually executes into s6-svscan which exits according to its page.
- Since prepare-svscan is an execline script, it exits with an approximation of employed program that failed.
- prepare-svscan mostly uses execline and s6 software, the exit behaviour of which can be looked up on their respective pages.
- See also: execline exit code handling.
Options
- There are no otions to prepare-svscan.
