From 1de372dcd4f43ef10b5f8ee95dc32c45d770a134 Mon Sep 17 00:00:00 2001 From: Wes Peters Date: Fri, 26 Apr 2002 07:31:04 +0000 Subject: 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 --- etc/rc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'etc') diff --git a/etc/rc b/etc/rc index c5e7d53cd26f..ed4ceeab5f38 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]) -- cgit v1.3