uwe
feec5ded24
Use NULL instead of 0 for null pointer.
2017-08-07 22:08:12 +00:00
apb
292aec205d
When the third arg to fwrite() is a size in bytes, then the second arg
...
should be 1. sizeof(*mbuf) happens to equal 1, but it's better not
to rely on that.
2014-03-28 18:27:14 +00:00
joerg
8bdebf9d52
statc + __dead
2011-08-27 18:54:39 +00:00
wiz
adc40ee487
Add -b and -vxz to usage.
2011-02-16 19:33:48 +00:00
dyoung
00ef49e965
Add flags -v, -x, and -z for verbose, debug, and silent shutdowns,
...
respectively, by passing flags AB_VERBOSE, AB_DEBUG, and/or AB_SILENT to
reboot(2).
2011-02-16 17:53:31 +00:00
riz
b82a6579fe
Remove _PATH_NOLOGIN before reboot, as well as before exit(), to prevent
...
a root file system which has been marked read-only in fstab from continuing
to prevent logins after reboot. From Ian D. Leroux in PR#43390.
2010-06-09 04:51:53 +00:00
lukem
6543a91fea
Remove the \n and tabs from the __COPYRIGHT() strings.
...
(Tweak some to use a consistent format.)
2008-07-20 01:20:21 +00:00
dholland
311ef454d2
Improvements and clarifications to log messages and also to the man page.
...
Partially cherry-picked from or inspired by PR bin/36551 by Greg A. Woods,
plus some additional grammar/usage/clarity adjustments while I was passing
through. Any mistakes are mine.
2008-02-09 04:09:22 +00:00
perry
8b0f9554ff
convert __attribute__s to applicable cdefs.h macros
2007-12-15 19:44:37 +00:00
jnemeth
2f4c83c097
PR/36626 - Jukka Salmi -- fails to compile if DEBUG is defined
2007-07-10 23:50:35 +00:00
christos
8a56ee5512
- sprinkle static
...
- pass WARNS=4 and lint
- use size_t/time_t where appropriate
- get/setprogname()
- before executing rc.shutdown, set the real user id to 0, because shutdown
scripts may depend on it (for example su depends on being root).
- use warn instead of perror, and make sure we use the right errno.
2007-03-14 03:52:28 +00:00
jnemeth
61f477b7e3
PR/31531: Takahiro Kambe: shutdown(8) quietly exit if execed from login shell
2006-03-07 22:19:55 +00:00
christos
2c6eadc9ce
Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
...
programs that did not compile before.
2005-06-27 01:00:04 +00:00
xtraeme
48bd1327fa
Finish previous (use ANSI function declarations) this time.
2005-02-05 13:17:54 +00:00
xtraeme
866012a7e2
Kill __P(), use ANSI function declarations.
2005-02-05 13:15:12 +00:00
dsl
1869f0e146
Add (unsigned char) cast to ctype functions
2004-11-05 21:56:01 +00:00
dsainty
ed00687c42
Comment typo: unecessary->unnecessary
2004-10-09 02:51:19 +00:00
agc
276d62f603
Move UCB-licensed code from 4-clause to 3-clause licence.
...
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:22 +00:00
atatat
f232e00070
Add "-b bootstr" for shutdown to pass to reboot(8), so that shutdown
...
(which runs rc.shutdown, which might do stuff like, say, save your
ipnat or ipf state for restoration on reboot) can tell machines (sparc
and sun3 machines presently) how to boot.
2002-10-18 20:35:36 +00:00
cgd
30b3e4f5c7
__CONCAT does token pasting, not string concatnation. if something like:
...
__CONCAT("foo","bar");
actually works to concantate strings, it's because the preprocessor expands
it into "foo""bar" as separate strings, and then ANSI string concatenation
is performed on that. It's more straightforward to just use ANSI string
concatenation directly, and newer GCCs complain (rightly) about misuse
of token pasting.
2000-12-20 00:31:41 +00:00
jdolecek
9ada2e4d0c
backoff rev 1.36 - it's made obsolete by last rc.d changes and using
...
arbitrary hard time limit for /etc/rc.shutdown is not right anyway
2000-07-25 18:59:44 +00:00
jdolecek
02ca64b4c6
when running /etc/rc.shutdown, don't want on it until it completes
...
indefinitely - by default, wait maximum of 300 seconds only
the timeout is settable via new -T flag
Adjust history to mention addition of shutdown hooks and -T option on manpage
This fixes bin/10637.
2000-07-20 17:33:57 +00:00
is
7bf4e6a5e3
exect->execve.
...
During my investigation, no reason could be found to enable tracing.
Fixes PR 7782 by Christoph Martin.
1999-10-31 13:24:05 +00:00
bad
1bb90faab4
testo. We want to source /etc/rc.shutdown.
...
Fixes PR #6474 .
1998-11-22 19:13:45 +00:00
bad
7404107445
Run /etc/rc.shutdown when the final shutdown time has come.
...
Thanks to Ted Lemon for helping with my English.
1998-10-29 20:12:56 +00:00
enami
3c12da56ad
Initialize the global variable `shuttime' with current time when
...
user requested to shutdown now, so that correct time is written in
/etc/nologin.
1998-10-09 03:01:40 +00:00
enami
2691695883
Add -p option in usage.
1998-10-09 02:26:17 +00:00
ross
029a64cc29
from Erik Bertelsen <erik@mediator.uni-c.dk>
...
{ put } { in } { lots } { of } { these } { to } { shut } { up } { egcs }
1998-08-25 19:18:12 +00:00
mycroft
09ef8c4ccd
const poisoning.
1998-07-26 20:18:32 +00:00
mrg
c028709e08
KNF. ensure hostname is nul-terminated
1998-07-05 08:34:25 +00:00
thorpej
ff77be620b
Add a -p option, to power down the system at the specified time.
1998-06-06 21:18:54 +00:00
kleink
ed110b2e5e
Need <time.h> for ctime(), time(), localtime() and mktime() prototypes.
1998-04-01 15:17:31 +00:00
fair
32a679e7b7
add -D (no detach) option, per PR#4810
1998-03-23 05:00:15 +00:00
mycroft
9a257260cf
Oops; remove DEBUG.
1998-01-21 00:33:56 +00:00
mycroft
fff43038f7
Slight code rearrangement.
1998-01-21 00:32:53 +00:00
mycroft
6e07276e0f
Document previous changes.
1998-01-20 23:24:46 +00:00
mycroft
fea6f55d8d
Recognize `-' only if it is the only argument after the time.
1998-01-20 23:13:31 +00:00
mycroft
d311785b75
Allow `-dh'. Rearrange a bit.
1998-01-20 23:05:15 +00:00
mycroft
5ecc83ac42
Use err*(3) and warn*(3). Fix reading of the message from stdin.
1998-01-20 22:30:15 +00:00
mycroft
2db779a0ce
Allow a century to be specified.
...
Don't validate the mmddhhmm values; mktime(3) does it.
1998-01-20 22:14:09 +00:00
perry
87ea5a1ff3
make Y2K compliant and document as such.
1998-01-20 20:55:22 +00:00
enami
ae3fbb603f
Don't delcare optind.
1997-10-01 02:24:29 +00:00
lukem
704a9823f1
resolve conflicts from lite-2 merge
1997-09-16 12:54:42 +00:00
lukem
38db486f8e
* cleanup for WARNS=1
...
* deprecate register
* fix .Nm usage
1997-09-15 11:17:10 +00:00
mikel
0b09e047ba
cleanup for gcc -Wall
1997-07-10 05:08:06 +00:00
jtk
67085194b6
add -d option to shutdown, as companion to reboot's -d flag (force crash dump)
1997-07-09 02:39:37 +00:00
mikel
7f50ef911a
eliminate possibility that execle() will be called with one too many
...
arguments.
1997-01-23 05:48:06 +00:00
thorpej
8e41017b18
After passing the terminating NULL for the argv list to execle(),
...
don't forget the (NULL) envp.
From Lennart Augustsson <augustss@cs.chalmers.se>, PR #2737 .
1996-12-11 04:05:21 +00:00
cgd
0114e805ce
convert to new RCS Id conventions; reduce my headache
1995-03-18 14:54:19 +00:00
mycroft
ea7b5d4ec6
Eliminate uses of some obsolete functions.
1994-09-23 14:26:58 +00:00