Parent Directory
|
Revision Log
| Links to HEAD: | (view) (download) (annotate) |
| Sticky Revision: |
shutdown: Fix r327476 by adding init Initialize maybe_today. While here sort. PR: 32411 Additionally reported by: rgrimes, ian
shutdown: Assume absolute time is in the future The original bug describes it best: When an absolute time is specified to shutdown, the program's behavior depends on whether that time has passed during the current calendar day. POLA would suggest that for shutdown, whose time argument is always supposed to be in the future, absolute times specified without a specific date should refer to the next occurrence of that time, rather than erroring out if that time has already passed during the current day. PR: 32411 Submitted by: wollman@khavrinen.lcs.mit.edu Submitted on: 2001-11-30 20:30:01 UTC Reviewed by: asmodai (at time of bug submission)
General further adoption of SPDX licensing ID tags. Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point.
Add -c to the usage statements. Submitted by: Maxim Konovalov
Add power cycle support (-c) to shutdown. Sponsored by: Netflix
Renumber copyright clause 4 Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96
sbin/shutdown: Support time units as in 'shutdown -r +5sec' Units supported: s, sec, m, min, h, hour. Differential Revision: https://reviews.freebsd.org/D1272
Restore a piece of BSD history. PR: 169127 Submitted by: Ruben de Groot <ruben@hacktor.com> MFC after: 1 week
shutdown: Remove unnecessary 2-second delay.
Replace index() and rindex() calls with strchr() and strrchr(). The index() and rindex() functions were marked LEGACY in the 2001 revision of POSIX and were subsequently removed from the 2008 revision. The strchr() and strrchr() functions are part of the C standard. This makes the source code a lot more consistent, as most of these C files also call into other str*() routines. In fact, about a dozen already perform strchr() calls.
Add missing static keywords for global variables to tools in sbin/. These tools declare global variables without using the static keyword, even though their use is limited to a single C-file, or without placing an extern declaration of them in the proper header file.
For compatibility with Linux and Solaris add poweroff(8). It is implemented as a hard link to shutdown(8) and it is equivalent of: # shutdown -p now While I'm here put one line of usage into one line of C code so it is easier to grep(1) and separate unrelated code with empty line. MFC after: 2 weeks
Add missing `void' for functions without arguments. While there, rename die_you_gravy_sucking_pig_dog() to something that's less moronic.
Static'ify internal methods and use prototype.
Use new style declarations instead of K&R ones.
Use modern style defination for main() and move a extern declaration to global section. Bump WARNS?= to 6
Remove advertising clause from University of California Regent's license, per letter dated July 22, 1999. Approved by: core, imp
Centralize _PATH_* definitions. Submitted by: Tim Kientzle <kientzle@acm.org> (embellished by me)
Use __FBSDID() to quiet GCC 3.3 warnings.
o remove __P o remove main prototype
Constify, de-register-ify, __unused-ify, and set WARNS=2. Submitted by: Mike Barcroft <mike@q9media.com>
$Id$ -> $FreeBSD$
Avoid ambigious if/else
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
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.
Fix a coredump with negative (due to overflow) offset values.
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).
Fixed missing 'p' and `-' flags and other defects in the usage message. Fixed some style bugs.
Add a '-p' flag to shutdown which corresponds to the '-p' flag to halt, requesting a system power-off after shutdown.
Correct use of .Nm. Add rcsid. Do not dot terminate err(3) strings. Spelling.
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.
Added environment parameter to execle calls. Obtained from: NetBSD PR2737 (augustss@cs.chalmers.se) via OpenBSD
Correct a comment from my last commit.
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.
Make the daemon process a true daemon by calling setsid(). PR: bin/3202 Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
Use err(3).
compare return value from getopt against -1 rather than EOF, per the final posix standard on the topic.
-n was broken 2.2 candidate (probably)
Delete bogus referneces to timezone code internal header file `tzfile.h', which is no longer bogusly installed in /usr/include.
Yanked out (now obsolete) support for 'fastboot'.
Submitted by: M.C. Wong Obtained from: Don't throw away the /etc/nologin file in the -k case.
This commit was generated by cvs2svn to compensate for changes in r1558, which included commits to RCS files with non-trunk default branches.
BSD 4.4 Lite sbin Sources Note: XNSrouted and routed NOT imported here, they shall be imported with usr.sbin.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.
| ViewVC Help | |
| Powered by ViewVC 1.1.27 |