File: halt.8

package info (click to toggle)
sysvinit 2.86.ds1-38
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 1,260 kB
  • ctags: 655
  • sloc: ansic: 7,385; sh: 4,399; makefile: 405; perl: 244
file content (102 lines) | stat: -rw-r--r-- 3,064 bytes parent folder | download | duplicates (6)
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
.\"{{{}}}
.\"{{{  Title
.TH HALT 8 "Nov 6, 2001" "" "Linux System Administrator's Manual"
.\"}}}
.\"{{{  Name
.SH NAME
halt, reboot, poweroff \- stop the system.
.\"}}}
.\"{{{  Synopsis
.SH SYNOPSIS
.B /sbin/halt
.RB [ \-n ]
.RB [ \-w ]
.RB [ \-d ]
.RB [ \-f ]
.RB [ \-i ]
.RB [ \-p ]
.RB [ \-h ]
.br
.B /sbin/reboot
.RB [ \-n ]
.RB [ \-w ]
.RB [ \-d ]
.RB [ \-f ]
.RB [ \-i ]
.br
.B /sbin/poweroff
.RB [ \-n ]
.RB [ \-w ]
.RB [ \-d ]
.RB [ \-f ]
.RB [ \-i ]
.RB [ \-h ]
.\"}}}
.\"{{{  Description
.SH DESCRIPTION
\fBHalt\fP notes that the system is being brought down in the file
\fI/var/log/wtmp\fP, and then either tells the kernel to halt, reboot or
poweroff the system.
.PP
If \fBhalt\fP or \fBreboot\fP is called when the system is
\fInot\fP in runlevel \fB0\fP or \fB6\fP, in other words when it's running
normally, \fBshutdown\fP will be invoked instead (with the \fB-h\fP
or \fB-r\fP flag). For more info see the \fBshutdown\fP(8)
manpage.
.PP
The rest of this manpage describes the behaviour in runlevels 0
and 6, that is when the systems shutdown scripts are being run.
.\"}}}
.\"{{{  Options
.SH OPTIONS
.IP \fB\-n\fP
Don't sync before reboot or halt.
.IP \fB\-w\fP
Don't actually reboot or halt but only write the wtmp record
(in the \fI/var/log/wtmp\fP file).
.IP \fB\-d\fP
Don't write the wtmp record. The \fB\-n\fP flag implies \fB\-d\fP.
.IP \fB\-f\fP
Force halt or reboot, don't call \fBshutdown\fP(8).
.IP \fB\-i\fP
Shut down all network interfaces just before halt or reboot.
.IP \fB\-h\fP
Put all harddrives on the system in standby mode just before halt or poweroff.
.IP \fB\-p\fP
When halting the system, do a poweroff. This is the default when halt is
called as \fBpoweroff\fP.
.\"}}}
.\"{{{  Diagnostics
.SH DIAGNOSTICS
If you're not the superuser, you will get the message `must be superuser'.
.\"}}}
.\"{{{  Notes
.SH NOTES
Under older \fBsysvinit\fP releases , \fBreboot\fP and \fBhalt\fP should
never be called directly. From release 2.74 on \fBhalt\fP and \fBreboot\fP
invoke \fBshutdown\fP(8) if the system is not in runlevel 0 or 6. This
means that if \fBhalt\fP or \fBreboot\fP cannot find out the current
runlevel (for example, when \fI/var/run/utmp\fP hasn't been initialized
correctly) \fBshutdown\fP will be called, which might not be what you want.
Use the \fB-f\fP flag if you want to do a hard \fBhalt\fP or \fBreboot\fP.
.PP
The \fB-h\fP flag puts all harddisks in standby mode just before halt
or poweroff. Right now this is only implemented for IDE drives. A side
effect of putting the drive in standby mode is that the write cache
on the disk is flushed. This is important for IDE drives, since the
kernel doesn't flush the write-cache itself before poweroff.
.PP
The \fBhalt\fP program uses /proc/ide/hd* to find all IDE disk devices,
which means that /proc needs to be mounted when \fBhalt\fP or
\fBpoweroff\fP is called or the \fB-h\fP switch will do nothing.
.PP
.\"}}}
.\"{{{  Author
.SH AUTHOR
Miquel van Smoorenburg, miquels@cistron.nl
.\"}}}
.\"{{{  See also
.SH "SEE ALSO"
.BR shutdown (8),
.BR init (8)
.\"}}}