root revision 155775
1#!/bin/sh 2# 3# $NetBSD: root,v 1.2 2000/05/13 08:45:09 lukem Exp $ 4# $FreeBSD: head/etc/rc.d/root 155775 2006-02-17 08:34:01Z ru $ 5# 6 7# PROVIDE: root 8# REQUIRE: fsck 9# KEYWORD: nojail 10 11. /etc/rc.subr 12 13name="root" 14start_cmd="root_start" 15stop_cmd=":" 16 17root_start() 18{ 19 # root normally must be read/write, but if this is a BOOTP NFS 20 # diskless boot it does not have to be. 21 # 22 case ${root_rw_mount} in 23 [Nn][Oo] | '') 24 ;; 25 *) 26 if ! mount -uw /; then 27 echo 'Mounting root filesystem rw failed, startup aborted' 28 /bin/kill -QUIT $$ 29 fi 30 ;; 31 esac 32 33 umount -a >/dev/null 2>&1 34 35 # If we booted a special kernel remove the record 36 # so we will boot the default kernel next time. 37 if [ -x /sbin/nextboot ]; then 38 /sbin/nextboot -D 39 fi 40} 41 42load_rc_config $name 43run_rc_command "$1" 44