freebsd-dev/etc/rc.d/root
Mike Makonnen 82387f41ed Luke Mewburn has indicated that they (NetBSD) are not interested
in keeping the scripts under rc.d in sync with us. So, remove
NetBSD specific stuff (which made our scripts more complicated
than necessary).

The NetBSD ident string will be left intact, both for history and
also incase we wish to pull in future versions.
2004-01-17 10:59:43 +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: FreeBSD
. /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 -u -o rw /; 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/nextkernel ]; then
rm -f /boot/nextkernel
fi
}
load_rc_config $name
run_rc_command "$1"