summaryrefslogtreecommitdiff
path: root/sbin/shutdown
AgeCommit message (Collapse)Author
2017-04-03warn format string should be literal.Frederic Cambus
OK deraadt@, millert@
2016-09-01Aggressively use dprintf, rather than crazy unchecked writes. UseTheo de Raadt
localtime() since it tends to work better than ctime() when some filesystems are absent. ok guenther
2015-11-16initially, pledge "stdio rpath wpath cpath getpw tty id proc exec", yesTheo de Raadt
it sounds like a lot, but this will eventually run the /etc/rc scripts to shutdown, then run reboot or halt. After looking at getpw*, drop pledge "getpw". Later drop to just "stdio exec"... This depends on new pledge semantics for revoke(2). with help from jca ok guenther millert semarie tedu jca
2015-04-23error in strtonum() conversion; found by Nathanael RensenTheo de Raadt
2015-04-18Convert many atoi() calls to strtonum(), adding range checks and failureTheo de Raadt
handling along the way. Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert
2015-03-15tzfile.h is an internal header that should never have been installed.Todd C. Miller
What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes the tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE define has been moved to time.h temporarily until its usage is replaced by 1900 in the tree. Actual removal of tzfile.h is pending a ports build. Based on a diff from deraadt@
2015-01-21Build the argument list for halt/reboot without excessive use ofChristian Weisgerber
the conditional operator. Adapted from NetBSD. ok miod@
2015-01-21Use plain "-p" to specify "halt and power down", for consistencyChristian Weisgerber
and compatibility with other BSDs. Adapted from FreeBSD. Still permit the combination "-hp" as requested by many. ok sthen@
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2013-11-22Whole bunch of (unsigned char) casts carefully added for ctype calls.Theo de Raadt
Careful second audit by millert
2009-12-24spelling fixes, from Brad Tilley; we will not fix src/sbin/dump/dump.hIgor Sobrado
as neither arrayified not arrayfied exist -- sanctioned dictionaries like Merriam-Webster ones suggest a few alternatives (e.g., arrayed), however these made up words are easy to understand and we are not certain that current ones are not ok. ok jmc@
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2007-11-19remove another list which just keeps going out of date;Jason McIntyre
2007-05-31convert to new .Dd format;Jason McIntyre
2007-01-29sort FILES;Jason McIntyre
2006-10-18Replace gcc __attribute with __dead. Recompile yields no binary change.Chad Loder
2005-12-02more sig_atomic_tTheo de Raadt
2005-05-19sort options + sync usage();Jason McIntyre
2005-03-09Sync with reboot(8) man page.Kenji Aoyama
(luna88k and zaurus also work with -p option.) ok miod@
2004-01-24minor knfTheo de Raadt
2003-07-30NULL -> (char *)NULL in execle; ok millert@Anil Madhavapeddy
2003-07-15.Ql Fl -> .Sq Fl where literal makes no sense;Jason McIntyre
2003-06-03- section reorderJason McIntyre
- some mdoc fixes
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-04-16use errx instead of fprintf+exit; millert@ okMichael Shalayeff
2002-12-08GNU semantics say that if optstring begins with '-' thenTodd C. Miller
each non-option shall be treated as arguments to option '\1'. BSD getopt match '-' in optstring with a '-' on the command line. This is used to support deprecated options like "su -" that would otherwise prevent the use of getopt(). Resolving this simply requires that the leading '-' be moved somewhere else (I moved it to the end of optstring) since position within optstring is not meaningful.
2002-07-03ansiTheo de Raadt
2002-05-26pid_t cleanupTheo de Raadt
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-12-13o) start new sentence on a new line;Mike Pechkin
o) wrap long lines; o) fix bogus .Xr usage; o) we don't like blank lines; o) always close .Bl tags; o) OpenBSD -> .Ox; o) don't like .Pp before .Ss; millert@ ok;
2001-11-05kill more registers;Mike Pechkin
millert@ ok
2001-10-11Add sparc64 to the list of arches which can poweroff at shutdown, andMiod Vallat
sort it.
2001-09-18Mention macppc in the list of platforms which can do poweroff at shutdown.Miod Vallat
2001-08-07No need to remove /etc/nologin after killing shutdown; signalHeikki Korpela
handler will take care of this. Pointed out by bk@rt.fm; millert@ ok. (Although it was millert@ who asked for it in the first place, bad me for not checking the source. :-)
2001-08-07Document how to cancel a scheduled shutdown with kill(1).Heikki Korpela
Also mention that /etc/nologin should be deleted after this if needed. ok millert@
2001-07-09correct type on last arg to execl(); nordin@cse.ogi.eduTheo de Raadt
2001-07-07major -Wall cleanup, almost completeTheo de Raadt
2001-06-05Alphabetize SEE ALSO entries; mpech@prosoft.org.lvAaron Campbell
2001-01-28remove i386 md note per Theo's requestMarco S Hyman
2001-01-28remove i386 md note per Theo's requestMarco S Hyman
2001-01-26Mention that shutdown brings the system to single user mode when issuedMarco S Hyman
without options. Other wording tweaks. Move comment related to -p to where -p is defined, not where -h is defined.
2001-01-19mark signal races i cannot fix at the momentTheo de Raadt
2001-01-15use _exit() in term handler if real signalTheo de Raadt
2001-01-05Add i386 specific sysctl to modify halt -p processing, required to makeMarco S Hyman
powerdown work correctly on some processors. Idea from mickey@ and smcho@tsp.korea.ac.kr. Tested my me and angelos@. Note: If you want to try these out you'll need to cd /sys/arch/i386/include && sudo install -m 444 -o root -g root cpu.h /usr/include/i386 cd /usr/src/sbin/sysctl && make obj && make && sudo make install to get a sysctl that understands the new variable (machdep.apmhalt).
2000-11-09Change all option list specifications to ".Bl -tag -width Ds". Most manAaron Campbell
pages just needed their -width parameter tweaked to "Ds", which provides a nice width of 6 constant characters. For consistency more than anything.
2000-06-18- Give more precise definitions for the -d and -f options.Aaron Campbell
- Clean up FILES section. - s/BACKWARD COMPATIBILITY/COMPATIBILITY/ - Use standard options list introduction.
2000-04-15- For consistency, `super-user' -> `superuser' in all cases.Aaron Campbell
- Some punctuation fixes. - Some `id' -> `ID'.
2000-04-12Trailing whitespace begone!Aaron Campbell
2000-03-18Remove hard sentence breaks, and some other cleanup along the way.Aaron Campbell
2000-01-15add 'd' to usage. mention rc.shutdown in the man page.Eric Jackson