shutdown.8.m4 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. changequote(`@@@',`$$$')dnl
  2. @@@.TH SHUTDOWN "8" "$$$MONTH YEAR@@@" "Dinit $$$VERSION@@@" "Dinit \- service management system"
  3. .SH NAME
  4. $$$SHUTDOWN_PREFIX@@@shutdown, $$$SHUTDOWN_PREFIX@@@halt, $$$SHUTDOWN_PREFIX@@@poweroff, $$$SHUTDOWN_PREFIX@@@reboot \- system shutdown
  5. .\"
  6. .SH SYNOPSIS
  7. .\"
  8. .B $$$SHUTDOWN_PREFIX@@@shutdown
  9. [\fB\-r\fR|\fB\-h\fR|\fB\-p\fR] [\fB\-\-use\-passed\-cfd\fR]
  10. [\fB\-\-system\fR]
  11. .br
  12. \fB$$$SHUTDOWN_PREFIX@@@halt\fR [\fIoptions...\fR]
  13. .br
  14. \fB$$$SHUTDOWN_PREFIX@@@poweroff\fR [\fIoptions...\fR]
  15. .br
  16. \fB$$$SHUTDOWN_PREFIX@@@reboot\fR [\fIoptions...\fR]
  17. .\"
  18. .SH DESCRIPTION
  19. .\"
  20. This manual page is for the shutdown utility included with the \fBDinit\fR
  21. service manager package. See \fBdinit\fR(8).
  22. The $$$SHUTDOWN_PREFIX@@@shutdown, $$$SHUTDOWN_PREFIX@@@reboot, $$$SHUTDOWN_PREFIX@@@poweroff and $$$SHUTDOWN_PREFIX@@@halt
  23. commands can be used to instruct the service manager daemon to perform a service rollback and then to shutdown the system.
  24. They can also perform shutdown directly, without service rollback.
  25. Note that for consistency with other packages "$$$SHUTDOWN_PREFIX@@@halt" and "$$$SHUTDOWN_PREFIX@@@poweroff" aliases
  26. are provided, however they have no special significance. The default action
  27. is to power down the system if called as either "$$$SHUTDOWN_PREFIX@@@shutdown", "$$$SHUTDOWN_PREFIX@@@halt", or
  28. "$$$SHUTDOWN_PREFIX@@@poweroff".
  29. .\"
  30. .SH OPTIONS
  31. .TP
  32. \fB\-\-help\fR
  33. Display brief help text and then exit.
  34. .TP
  35. \fB\-r\fP
  36. Request a shutdown followed by restart. This is the default if executed as
  37. \fB$$$SHUTDOWN_PREFIX@@@reboot\fR.
  38. .TP
  39. \fB\-h\fP
  40. Shutdown and then halt the system (without powering down).
  41. .TP
  42. \fB\-p\fP
  43. Shutdown and then power down the system. This is the default unless executed
  44. as \fB$$$SHUTDOWN_PREFIX@@@reboot\fR.
  45. .TP
  46. \fB\-\-use\-passed\-cfd\fR
  47. Instead of attempting to open a socket connection to the service daemon,
  48. use a pre-opened connection that has been passed to the process from its parent
  49. via an open file descriptor.
  50. The file descriptor with the connection is identified by the contents of the DINIT_CS_FD
  51. environment variable.
  52. .TP
  53. \fB\-\-system\fR
  54. Shut down directly, instead of by issuing a command to the service manager.
  55. Use of this option should be avoided, but it may allow performing a clean shutdown in case
  56. the service manager has stopped responding.
  57. The service manager may invoke \fB$$$SHUTDOWN_PREFIX@@@shutdown\fR with this option in order to perform
  58. system shutdown after it has rolled back services.
  59. .\"
  60. .SH SHUTDOWN HOOKS
  61. .\"
  62. To allow for special shutdown actions, if an executable file exists at any of the following
  63. locations, it will be executed before the system is shut down but after terminating all other
  64. processes:
  65. .\"
  66. .RS
  67. .IP \(bu
  68. /etc/dinit/shutdown-hook
  69. .IP \(bu
  70. /lib/dinit/shutdown-hook
  71. .RE
  72. .LP
  73. Only the first existing executable file from the above list will be executed. The first location
  74. is intended to allow customisation by the system administrator (and should usually be a script
  75. which on completion executes the 2nd shutdown hook, if present).
  76. The 2nd location is intended for distribution control.
  77. .LP
  78. If found and successfully executed, the shutdown hook should perform any special shutdown actions
  79. that depend on all processes being terminated.
  80. If the shutdown hook cleanly unmounts (or remounts as read-only) all file systems including the
  81. root file system, it should exit with status 0 (success), which will prevent \fB$$$SHUTDOWN_PREFIX@@@shutdown\fR from
  82. attempting to unmount file systems itself.
  83. If it does not unmount file systems, the script should not exit with status 0.
  84. .\"
  85. .SH SEE ALSO
  86. .\"
  87. \fBdinit\fR(8), \fBdinitctl\fR(8)
  88. .\"
  89. .SH AUTHOR
  90. Dinit, and this manual, were written by Davin McCall.
  91. $$$dnl