Deleted Added
full compact
root (78345) root (98184)
1#!/bin/sh
2#
1#!/bin/sh
2#
3# $NetBSD: root,v 1.1.1.1 2000/03/10 11:53:24 lukem Exp $
3# $NetBSD: root,v 1.2 2000/05/13 08:45:09 lukem Exp $
4# $FreeBSD: head/etc/rc.d/root 98184 2002-06-13 22:14:37Z gordon $
4#
5
6# PROVIDE: root
7# REQUIRE: fsck
5#
6
7# PROVIDE: root
8# REQUIRE: fsck
9# KEYWORD: FreeBSD NetBSD
8
9. /etc/rc.subr
10
11name="root"
12start_cmd="root_start"
13stop_cmd=":"
14
15root_start()
16{
10
11. /etc/rc.subr
12
13name="root"
14start_cmd="root_start"
15stop_cmd=":"
16
17root_start()
18{
17 umount -a >/dev/null 2>&1
18 mount /
19 rm -f /fastboot
19 case `${CMD_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 exit 1
31 fi
32 ;;
33 esac
34
35 umount -a >/dev/null 2>&1
36 mount /
37
38 # If we booted a special kernel remove the record
39 # so we will boot the default kernel next time.
40 [ -e /boot/nextkernel ] && rm -f /boot/nextkernel
41 ;;
42 NetBSD)
43 umount -a >/dev/null 2>&1
44 mount /
45 rm -f /fastboot
46 ;;
47 esac
20}
21
22load_rc_config $name
23run_rc_command "$1"
48}
49
50load_rc_config $name
51run_rc_command "$1"