1#!/bin/sh 2# 3# $NetBSD: root,v 1.2 2000/05/13 08:45:09 lukem Exp $ 4# $FreeBSD: src/etc/rc.d/root,v 1.5 2002/10/31 02:06:05 gordon Exp $ 5# 6 7# PROVIDE: root 8# REQUIRE: fsck 9 10. /etc/rc.subr 11 12name="root" 13start_cmd="root_start" 14stop_cmd=":" 15 16root_start() 17{ 18 # root normally must be read/write, but if this is a BOOTP NFS 19 # diskless boot it does not have to be. 20 # 21 case ${root_rw_mount} in 22 [Nn][Oo] | '') 23 ;; 24 *) 25 if ! mount -u -o rw /; then 26 echo 'Mounting root filesystem rw failed; startup aborted' 27 stop_boot true 28 fi 29 ;; 30 esac 31 umount -a >/dev/null 2>&1 32 return 0 33} 34 35load_rc_config $name 36run_rc_command "$1" 37