The system-init program
system-init is a minimal, scripted init to bring up a goetia based system.
Interface
system-init
- system-init takes no arguments.
-
It makes
/dev/consoleits stdout and stderr. -
It reads the environment variable
BUNDLE, which can be specified on the Kernel command line. If it is undefined, it usesdefaultas the value. -
It reads the environment variable
PATH, which can be specified on the Kernel command line. If it is undefined, it uses/command:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/libexec:/usr/local/libexecas the value. -
It sets the
PATHenvironment variable to the value chosen above. -
It chdirs to
/. -
It runs
s6-setsidto become the session leader. - It creates the runtime directory if it does not already exist.
- It mounts the runtime directory tmpfs.
-
It copies the old system logs from the
system/uncaught-logssubdirectory of the log directory to thesystem/subdirectory of the runtime directory if they exist. -
It runs
prepare-svscanwith the proper arguments. -
Finally, it executes into
s6-svscanon the scandir represented by thesystem/servicesubdirectory of the runtime directory.
Exit codes
- system-init usually executes into s6-svscan which exits according to its page.
- Since system-init is an execline script, it exits with an approximation of employed program that failed.
- system-init 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 options to system-init.
Notes
system-init is primarily intended to be used as an init for an acutal boot process, not for containers.
