The system-shutdown program
system-shutdown is the interface to the system-shutdown-daemon.
Interface
system-shutdown -h | -p | -r
-
system-shutdown writes its argument to the file
DIRECTIVEin the envdir at theshutdown-directivesubdirectory of the system runtime directory. - It continues to initiate the shutdown sequence by starting the service goetia-shutdown.
Options
-
-h: at the end of the shutdown sequence, halt the system. -
-p: at the end of the shutdown sequence, poweroff the system. -
-r: at the end of the shutdown sequence, reboot the system.
Exit codes
- system-shutdown exits 100 if wrong options were used.
- Since system-shutdown is an execline script, it exits with an approximation of employed program that failed.
- system-shutdown 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.
Notes
There is a reason this program exists as part of (multiple) goetia-init packages and not as part of goetia-base. It is that some supported init systems, like s6-linux-init (through goetia-s6-linux-init) provide their own shutdown procedure and interface.
