Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sbin/shutdown



Module Name:    src
Committed By:   kre
Date:           Fri Jul  1 16:45:13 UTC 2022

Modified Files:
        src/sbin/shutdown: shutdown.8 shutdown.c

Log Message:
Bring shutdown(8) into the 21st century.

I found this juxtaposition in the shutdown man page kind of
interesting:

     time  Time is the time at which shutdown will bring the system down
           and may be the word now or a future time in one of two formats:
           ... [2nd format:] [[[[[cc]yy]mm]dd]hh]mm,  ...
           If the century [cc] is not specified, it defaults to 1900 for
           years [yy] between 69 and 99, ...

In that, all the "[text]" except the one "[[[[["(etc) sequence are my
interjections, The ellipses ("...") represent where I omitted irrelevant
(for here) text.

Interesting yes, bizarre also.   Requiring a future time, and then
defaulting to the (long gone) 20th century (for any random year)
makes no sense at all.    So I fixed it.

In another hundred years or so, anytime from 2100 onwards, but best
left at least a decade into the new century, it will need altering again.
[One could write the code to automate this adjustment, but the man
page would still need updating.]   More significant changes will be
needed as the 101st century approaches (years 10000 and beyond), as
then a 2 digit century will no longer be adequate.   Call me then, and
if I'm able, I'll fix it.

If someone really has a need to schedule a shutdown for sometime
between 1969 and 1999 that can still be done by explicitly giving
the "19" cc value.  It is just no longer ever the default.

Otherwise, now, years 20..90 mean the 21st century (2020..2099)
(the first 2 of those are already unusable, but, IMO, that's OK)
and years 00..19 mean the 22nd century (2100..2119) (except that
00, 2100, is still technically the final year of the 21st century).

This is advance planning for near the end of the 21st century when
someone wants to schedule a shutdown for early in the following
century, and can't be bothered typing the 2 century digits.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sbin/shutdown/shutdown.8
cvs rdiff -u -r1.57 -r1.58 src/sbin/shutdown/shutdown.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index