about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--halt.866
-rw-r--r--shutdown.890
3 files changed, 160 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index f8d40e5..5af25a0 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,10 @@ install:
 	install -m644 pause.1 ${DESTDIR}/${PREFIX}/share/man/man1
 	install -d ${DESTDIR}/${PREFIX}/share/man/man8
 	install -m644 zzz.8 ${DESTDIR}/${PREFIX}/share/man/man8
+	install -m644 shutdown.8 ${DESTDIR}/${PREFIX}/share/man/man8
+	install -m644 halt.8 ${DESTDIR}/${PREFIX}/share/man/man8
+	ln -s halt.8 ${DESTDIR}/${PREFIX}/share/man/man8/poweroff.8
+	ln -s halt.8 ${DESTDIR}/${PREFIX}/share/man/man8/reboot.8
 	install -d ${DESTDIR}/etc/sv
 	install -d ${DESTDIR}/etc/runit/runsvdir
 	install -m755 ${SCRIPTS} ${DESTDIR}/etc/runit
diff --git a/halt.8 b/halt.8
new file mode 100644
index 0000000..80b8858
--- /dev/null
+++ b/halt.8
@@ -0,0 +1,66 @@
+.Dd July 29, 2014
+.Dt HALT 8
+.Os Linux
+.Sh NAME
+.Nm halt ,
+.Nm reboot ,
+.Nm poweroff
+.Nd stop the system
+.Sh SYNOPSIS
+.Nm halt
+.Op Fl n
+.Op Fl f
+.Nm reboot
+.Op Fl n
+.Op Fl f
+.Nm poweroff
+.Op Fl n
+.Op Fl f
+.Sh DESCRIPTION
+.Nm halt
+/
+.Nm reboot
+/
+.Nm poweroff
+tells
+.Xr init 8
+to bring down, reboot, or power off the system.
+Without
+.Fl f ,
+it is a shortcut for
+.Nm init 0
+/
+.Nm init 6 .
+.Bl -tag -width indent
+.It Fl n
+Don't sync before reboot or halt.
+Note that the kernel and storage drivers may still sync.
+.It Fl f
+Force halt or reboot, don't call
+.Xr init 8 .
+This is
+.Sy dangerous !
+.El
+.Sh UNSUPPORTED OPTIONS
+This version of
+.Nm
+is based on
+.Xr runit 8 ,
+the following features are
+.Sy not
+supported and silently ignored:
+.Bl -tag -width indent
+.It Fl w
+to just write the wtmp record.
+.It Fl d
+to not write the wtmp record.
+.It Fl h
+to put hard drives in standby mode.
+.It Fl i
+to shut down network interfaces.
+.Sh SEE ALSO
+.Xr shutdown 8 ,
+.Xr init 8
+.Sh AUTHOR
+.An Christian Neukirchen ,
+.Mt chneukirchen@gmail.com .
diff --git a/shutdown.8 b/shutdown.8
new file mode 100644
index 0000000..cb66ef4
--- /dev/null
+++ b/shutdown.8
@@ -0,0 +1,90 @@
+.Dd July 29, 2014
+.Dt SHUTDOWN 8
+.Os Linux
+.Sh NAME
+.Nm shutdown
+.Nd bring down the system
+.Sh SYNOPSIS
+.Nm shutdown
+.Op Fl rhP
+.Op Fl fF
+.Op Cm now | Cm + Ns Ar mins
+.Op Ar message...
+.Sh DESCRIPTION
+.Nm
+brings the system down in a secure way.
+All logged-in users
+are notified that the system is going down, and  
+.Xr login 1
+is blocked.
+.Pp
+By default,
+.Nm
+puts the system into single user mode.  Rebooting and halting the
+system can be done using the following options:
+.Bl -tag -width indent
+.It Fl c
+Cancel an ongoing shutdown.
+.It Fl f
+Enable fast booting; skip
+.Xr fsck 8
+on next boot.
+.It Fl F
+Force run of
+.Xr fsck 8
+on next boot.
+.It Fl h
+Halt the system.
+.It Fl k
+Don't really shutdown; only send the warning messages to everybody.
+.It Fl P
+Poweroff the system.
+.It Fl r
+Reboot the system.
+.It Cm now
+Shutdown without further waiting.
+.It Cm + Ns Ar mins
+Wait
+.Ar mins
+minutes before shutting down.
+.It Ar message
+Message displayed to all users, defaults to "system is going down".
+.El
+.Sh UNSUPPORTED OPTIONS
+This version of
+.Nm
+is based on
+.Xr runit 8 ,
+the following features are
+.Sy not
+supported:
+.Bl -tag -width indent
+.It Fl t Ar secs
+to wait
+.Ar secs
+seconds between SIGKILL and SIGTERM on shutdown is silently ignored.
+.It Fl a
+Use 
+.Pa /etc/shutdown.allow .
+.It Fl H
+Drop into boot monitor.
+.It Fl n
+Don't call
+.Xr init 8 .
+.It Ar hh Ns : Ns Ar mm
+Absolute time specification is not implemented.
+.El
+.Sh EXAMPLES
+Turn off the system:
+.Dl # shutdown -h now
+.Sh SEE ALSO
+.Xr fsck 8 ,
+.Xr init 8 ,
+.Xr runit 8 ,
+.Xr runsvchdir 8 ,
+.Xr halt 8 ,
+.Xr poweroff 8 ,
+.Xr reboot 8
+.Sh AUTHOR
+.An Christian Neukirchen ,
+.Mt chneukirchen@gmail.com .