Added patch from William Shipley which allows shutdown time to be specified

in the format +hh:mm. This is in addition to the existing formats such as
hh:mm, +m, and "now".

Cleared up compiler warning in dowall which can happen if the
output message is longer than the size limit on the snprintf()
buffer. This is not a bug, a the trucation works, but using a larger
buffer avoids the warning on systems with long user/host names.
This commit is contained in:
Jesse Smith
2020-06-20 13:41:18 -03:00
parent d4cc79bcb9
commit 584df5efaf
4 changed files with 22 additions and 8 deletions

View File

@@ -142,7 +142,9 @@ The \fItime\fP argument can have different formats. First, it can be an
absolute time in the format \fIhh:mm\fP, in which \fIhh\fP is the hour
(1 or 2 digits) and \fImm\fP is the minute of the hour (in two digits).
Second, it can be in the format \fB+\fP\fIm\fP, in which \fIm\fP is the
number of minutes to wait. The word \fBnow\fP is an alias for \fB+0\fP.
number of minutes to wait. Third, it can be in the format \fB+\fP\fIhh:mm\fP,
in which \fIhh:mm\fP is the number of hours and minutes to wait.
The word \fBnow\fP is an alias for \fB+0\fP.
.PP
If shutdown is called with a delay, it will create the advisory file
.I /etc/nologin