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
christos
ea369b9669
Deal with RESCUEDIR
2004-08-19 22:25:49 +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
wiz
52270a7fd9
Add Ns.
2003-06-30 11:49:54 +00:00
wiz
82196526d4
New sentence, new line in last. Bump date for last.
2002-10-18 22:44:42 +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
wiz
4ce43ae0cd
Whitespace nits
2001-11-16 10:25:42 +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
wiz
af69e93eb8
change mentioning of `login' to a .Xr in one place
2000-10-17 01:07:43 +00:00
jdolecek
339275db14
backoff rev 1.18 & 1.19 - 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 19:02:15 +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
3a7c71f3b9
fix synopsis line so that the -T syntax is right
2000-07-20 17:46:57 +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
jdolecek
94021a19a5
when running /etc/rc.shutdown, don't wait 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,
also move description of -D further up and slighly adjust.
This fixes bin/10637.
2000-07-20 17:33:56 +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
bad
af876a75fc
Delete redundant "the".
1998-10-29 18:55:27 +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
enami
138ef65e24
Sort options in SYNOPSIS alphabetically.
1998-10-09 02:24:08 +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
fair
3d7afc6d03
fix bad .Xr references
1998-04-29 09:49:10 +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
mycroft
af65e81265
Make these executables world-readable.
1997-10-11 11:05:28 +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