freebsd-nq/etc/rc.d/root
Ceri Davies f2072da025 Marius Nuennerich pointed out that nextboot(8) configured boot options
were now sticky.  This script was deleting /boot/nextkernel on boot, but
there is no code in the tree that creates that file since revision 1.15
of src/sbin/reboot/reboot.c.
nextboot(8) creates /boot/nextboot.conf, so remove that instead.

Approved by:	jhb (proxy mentor)
MFC after:	1 week
2006-01-15 23:12:26 +00:00

44 lines
738 B
Bash
Executable File

#!/bin/sh
#
# $NetBSD: root,v 1.2 2000/05/13 08:45:09 lukem Exp $
# $FreeBSD$
#
# PROVIDE: root
# REQUIRE: fsck
# KEYWORD: nojail
. /etc/rc.subr
name="root"
start_cmd="root_start"
stop_cmd=":"
root_start()
{
# root normally must be read/write, but if this is a BOOTP NFS
# diskless boot it does not have to be.
#
case ${root_rw_mount} in
[Nn][Oo] | '')
;;
*)
if ! mount -uw /; then
echo 'Mounting root filesystem rw failed, startup aborted'
/bin/kill -QUIT $$
fi
;;
esac
umount -a >/dev/null 2>&1
# If we booted a special kernel remove the record
# so we will boot the default kernel next time.
if [ -e /boot/nextboot.conf ]; then
rm -f /boot/nextboot.conf
fi
}
load_rc_config $name
run_rc_command "$1"