CVS commit: src/sbin/shutdown
"Robert Elz" <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module Name: src Committed By: kre Date: Mon May 11 23:21:07 UTC 2026 Modified Files: src/sbin/shutdown: shutdown.8 shutdown.c Log Message: PR bin/60248 Various fixes to shutdown First, fix (in a slightly different way than suggested) the incorrect use of (1 minutes) sometimes. While here, add more error checking to the shutdown time parsing, and fix -k to be what it was originally intended to be, which was nothing like "kick the users off" (which it didn't do, unless all the "shutdown coming" messages scared them away), all it did was install /etc/nologin so no-one could log in (from 5 mins before the scheduled time). That's pointless, if you want to install a /etc/nologin, just install it (cat >/etc/nologin). The -k flag was intended to assist with debugging, "k" was for "kidding" - shutdown goes though all the motions, writing messages, writing to syslog, etc - but that's all it does, no manipulation of /etc/nologin at all, and no actual shutting down of the system, when time's up, shutdown simply exits. Manual page updated to match. shutdown.c still needs lots of work, it completely abuses time_t in ways that should never be done. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sbin/shutdown/shutdown.8 cvs rdiff -u -r1.59 -r1.60 src/sbin/shutdown/shutdown.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.