summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorwes <wes@FreeBSD.org>2002-04-26 07:31:04 +0000
committerwes <wes@FreeBSD.org>2002-04-26 07:31:04 +0000
commit9bf40bea60a51889f77b8f5c8128b2bebe1a3284 (patch)
tree7ead246584ad34442c705cb33fc0bfa686914287 /etc/rc
parenta83271f3cb64d931c0f89f438d35104acfd34863 (diff)
downloadFreeBSD-src-9bf40bea60a51889f77b8f5c8128b2bebe1a3284.zip
FreeBSD-src-9bf40bea60a51889f77b8f5c8128b2bebe1a3284.tar.gz
Add a -k option to reboot to specify the kernel to boot next time
around. If the kernel boots successfully, the record of this kernel is erased, it is intended to be a one-shot option for testing kernels. This could be improved by having the loader remove the record of the next kernel to boot, it is currently removed in /etc/rc immediately after disks are mounted r/w. I'd like to MFC this before the 4.6 freeze unless there is violent objection. Reviewed by: Several on IRC MFC after: 4 days
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/rc b/etc/rc
index c5e7d53..ed4ceea 100644
--- a/etc/rc
+++ b/etc/rc
@@ -314,6 +314,10 @@ if [ -n "${diskless_mount}" -a -r "${diskless_mount}" ]; then
sh ${diskless_mount}
fi
+# If we booted a special kernel remove the record so we will boot
+# the default kernel next time
+rm -f /boot/nextkernel
+
# Reseed /dev/random with previously stored entropy.
case ${entropy_dir} in
[Nn][Oo])
OpenPOWER on IntegriCloud