Peter Wemm
7f3dea244c
$Id$ -> $FreeBSD$
1999-08-28 00:22:10 +00:00
Bill Fumerola
c1160fe492
Avoid ambigious if/else
1999-07-21 02:49:42 +00:00
Ruslan Ermilov
35cd460f8a
Signal init(8) instead of executing halt(8) or reboot(8)
...
when halting or rebooting the system. It benefits from
running /etc/rc.shutdown by init(8).
``-o'' flag is provided for backward compatibility.
PR: 5451
Discussed with: des
1999-06-21 16:06:21 +00:00
Joseph Koshy
1d4f4c0d21
Minor cleanups to shutdown(8):
...
- Make the -k "don't actually halt" flag incompatible with
the halt/reboot options -h, -p, and -r.
- The -n "don't sync" option is ignored if -k is specified.
Issue a warning message.
- Compute the actual shutdown time written to /var/run/nologin
correctly in the case of "now" being specified.
1999-06-21 06:21:05 +00:00
Ruslan Ermilov
966ea00a57
Fix a coredump with negative (due to overflow) offset values.
1999-06-18 14:26:07 +00:00
Bruce Evans
39b831af10
Merged from Lite2 (one bcopy -> memmove, one significant change:
...
don't unlink _PATH_NOLOGIN for the -k case even if shutdown terminates
abnormally. NetBSD already has this change).
1998-12-11 11:21:47 +00:00
Bruce Evans
689419f325
Fixed missing 'p' and `-' flags and other defects in the usage message.
...
Fixed some style bugs.
1998-12-11 11:04:19 +00:00
Mike Smith
7e2d04d7c3
Add a '-p' flag to shutdown which corresponds to the '-p' flag to halt,
...
requesting a system power-off after shutdown.
1998-12-10 23:54:02 +00:00
Philippe Charnier
d371486332
Correct use of .Nm. Add rcsid. Do not dot terminate err(3) strings. Spelling.
1998-08-03 06:22:43 +00:00
Alexander Langer
f6faa785f2
Pass an actual empty environment to execle() as per POSIX rather than
...
rely on undocumented behavior.
The following fixes were obtained from OpenBSD:
o -Wall fixes to tlist array initialization and assignment used
as truth value.
o Use a restricted environment.
o Improved error message when shutdown fails to exec reboot or halt.
1998-01-10 20:11:06 +00:00
Alexander Langer
42f9a8963d
Added environment parameter to execle calls.
...
Obtained from: NetBSD PR2737 (augustss@cs.chalmers.se ) via OpenBSD
1998-01-08 20:05:45 +00:00
Alexander Langer
7417978572
Correct a comment from my last commit.
1998-01-08 02:23:59 +00:00
Alexander Langer
2dc3422762
Allow 'shutdown datespec' to work into the next century. Handle dates
...
in the 22nd century and beyond even though it's irrelevant with a 32-bit
time_t which expires in the year 2038.
1998-01-08 02:21:30 +00:00
Joerg Wunsch
32c9dffb9d
Make the daemon process a true daemon by calling setsid().
...
PR: bin/3202
Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
1997-08-23 14:10:34 +00:00
Philippe Charnier
a2bfcdfd76
Use err(3).
1997-06-19 14:28:32 +00:00
Warner Losh
8d64695c7c
compare return value from getopt against -1 rather than EOF, per the final
...
posix standard on the topic.
1997-03-29 03:33:12 +00:00
Adam David
3cf6d2e792
-n was broken
...
2.2 candidate (probably)
1997-01-21 21:07:29 +00:00
Garrett Wollman
656dcd4316
Delete bogus referneces to timezone code internal header file `tzfile.h',
...
which is no longer bogusly installed in /usr/include.
1995-08-07 19:17:46 +00:00
David Greenman
32e68582d1
Yanked out (now obsolete) support for 'fastboot'.
1995-02-15 14:35:29 +00:00
Andreas Schulz
7dd4667fed
Submitted by: M.C. Wong
...
Obtained from:
Don't throw away the /etc/nologin file in the -k case.
1994-11-27 23:52:13 +00:00
Rodney W. Grimes
8fae3551ec
BSD 4.4 Lite sbin Sources
...
Note: XNSrouted and routed NOT imported here, they shall be imported with
usr.sbin.
1994-05-26 06:35:07 +00:00