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