-
-
Notifications
You must be signed in to change notification settings - Fork 50
SHUTDOWN(8) man page
SHUTDOWN(8) | Dinit - service management system | SHUTDOWN(8) |
shutdown, halt, poweroff, reboot, soft-reboot - system shutdown
shutdown [-r|-h|-p]
[--use-passed-cfd] [--system]
halt [options...]
poweroff [options...]
reboot [options...]
soft-reboot [options...]
This manual page is for the shutdown utility included with the Dinit service manager package. See dinit(8).
The shutdown, reboot, soft-reboot, poweroff and halt commands can be used to instruct the service manager daemon to perform a service rollback and then to shutdown the system. They can also perform shutdown directly, without service rollback.
Note that for consistency with other packages "halt" and "poweroff" aliases are provided, however they have no special significance. The default action is to power down the system if called as either "shutdown", "halt", or "poweroff".
- --help
- Display brief help text and then exit.
- -r
- Request a shutdown followed by restart. This is the default if executed as reboot.
- -s
- Restart the service manager and all user-space services without restarting the system. This is the default if executed as soft-reboot.
- The current boot-time options will be passed on to the restarted dinit and remain in effect (note that system recovery options, for example, may re-initiate the recovery process). Services must be suitably configured in order for this option to be useful; using this option in environments where it is not specifically supported is not recommended.
- -h
- Shutdown and then halt the system (without powering down).
- -p
- Shutdown and then power down the system. This is the default unless executed as reboot or soft-reboot.
- --use-passed-cfd
- Instead of attempting to open a socket connection to the service daemon, use a pre-opened connection that has been passed to the process from its parent via an open file descriptor. The file descriptor with the connection is identified by the contents of the DINIT_CS_FD environment variable.
- --system
- Shut down directly, instead of by issuing a command to the service manager. Use of this option should be avoided, but it may allow performing a clean shutdown in case the service manager has stopped responding.
- The service manager may invoke shutdown with this option in order to perform system shutdown after it has rolled back services.
To allow for special shutdown actions, if an executable file exists at any of the following locations, it will be executed before the system is shut down but after terminating all other processes:
- /etc/dinit/shutdown-hook
- /lib/dinit/shutdown-hook
Only the first existing executable file from the above list will be executed. The first location is intended to allow customisation by the system administrator (and should usually be a script which on completion executes the 2nd shutdown hook, if present). The 2nd location is intended for distribution control.
If found and successfully executed, the shutdown hook should perform any special shutdown actions that depend on all processes being terminated. If the shutdown hook cleanly unmounts (or remounts as read-only) all file systems including the root file system, it should exit with status 0 (success), which will prevent shutdown from attempting to unmount file systems itself. If it does not unmount file systems, the script should not exit with status 0.
dinit(8), dinitctl(8)
Dinit, and this manual, were written by Davin McCall.
September 2024 | Dinit 0.19.0 |
Copyright (C) 2016-2024 Davin McCall
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at LICENSE file & http://www.apache.org/licenses/LICENSE-2.0