1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
.TH SHUTDOWN 8 "August 30, 2022" "" "GNU/Linux System Adminstrator's manual"
.SH NAME
shutdown, reboot, poweroff \- poweroff or reboot the system
.SH SYNOPSIS
.B /usr/sbin/shutdown [-h] [-r] [-f] [-F] [now]
.br
.B /usr/sbin/reboot [-w] [-f] [-n]
.br
.B /usr/sbin/halt [-w] [-f] [-n]
.br
.B /usr/sbin/poweroff [-w] [-f] [-n]
.SH DESCRIPTION
.BR Shutdown
is a program to poweroff or reboot the system that maintains some compatibility with
original SysV-init halt, poweroff, reboot and shutdown programs.
These programs are expected by some initscripts, graphical desktop environments and tools like acpi.
.RE
When called as shutdown, halt or poweroff without options,
.BR runit(8)
is told to shutdown the system and poweroff.
.RE
When called as reboot
.BR runit(8)
is told to reboot the system.
.RE
When
.BR runit(8)
is not the current init system this program sends data in the appropriate format to perform the requested action to the initctl pipe, if it exists.
.SH SHUTDOWN OPTIONS
.TP
.B \-h
Shutdown the system and poweroff; this is the default. Actually this option is ignored and can be omitted, it is
maintained only for backward compatibility with Sysv's shutdown.
.TP
.B \-r
Reboot the system instead of poweroff.
.TP
.B \-f
Write a
.B /fastboot
flag file. The program or the scripts responsible for the system boot task can test for this file when the system comes up again and decide to skip fsck.
The program or the scripts that perform the boot task also need to take care of the removal of the flag file.
.TP
.B \-F
Write a
.B /forcefsck
flag file. The program or the scripts responsible for the system boot task can test for this file when the system comes up again and decide to run fsck with a 'force' flag.
The program or the scripts that perform the boot task also need to take care of the removal of the flag file.
.RE
The original Sysv shutdown implementation required a
.B time
parameter for shutdown and allowed for an optional
.B shutdown message.
The runit shutdown program does not support extra arguments after the options; if a
.B time
parameter other than 'now' is given, shutdown will exit with an error.
To retain compatibility with acpi, -H, -P flags and shutdown messages are ignored and
shutdown will continue without errors (see #1087001).
.SH HALT OPTIONS
.TP
.B \-f
Invoke sync(), then force an unsafe reboot or poweroff immediately without signaling the init system.
This will likely result in an unclean shutdown and can cause data loss or corruption.
When runit is init, this option is a No-Op and all other options are ignored. See #899246
.TP
.B \-\-force
Invoke sync(), then force an unsafe reboot or poweroff immediately without signaling the init system.
This will likely result in an unclean shutdown and can cause data loss or corruption.
This option works regardless of the running init system.
.TP
.B \-w, \-\-wtmp\-only
Try to write a shutdown wtmp entry in
.BR wtmpdb(8)
database; if
.B /usr/bin/wtmpdb
program is not found or not executable, a warning is printed instead.
.TP
.B \-n
Write a
.B /etc/runit/nosync
flag file. If this file exists runit does not invoke sync() before reboot or poweroff.
The
.B /etc/runit/nosync
flag file is also checked when this program is called with
.B \-f
or
.B \-\-force
.RE
Any other option given is ignored except that a warning is printed.
.SH SWITCHING FORM OTHER INIT SYSTEMS
This program maintains a compatibility layer with SysV-init's initctl pipe according to the spec described in SysV-init's initctl(5). This allow one to reboot the system when switching from another init to runit-init.
.RE
Currently only switching from systemd and SysV-init is tested but any other init system that maintains an initctl pipe compatible with SysV's one should work.
.SH BUGS
Combining flags, like
.B halt -wf
is not supported, all merged short options will be ignored.
.SH SEE ALSO
.BR init (8)
|