sbin/hammer2: Verify fstype UUID in hammer2_verify_volumes_common()
[dragonfly.git] / etc / rc.d / root
blob30e71c3e0a4ad4346c477e63c712de22123a7995
1 #!/bin/sh
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 $
7 # PROVIDE: root
8 # REQUIRE: fsck
10 . /etc/rc.subr
12 name="root"
13 start_cmd="root_start"
14 stop_cmd=":"
16 root_start()
18 # root normally must be read/write, but if this is a BOOTP NFS
19 # diskless boot it does not have to be.
21 case ${root_rw_mount} in
22 [Nn][Oo] | '')
25 if ! mount -u -o rw /; then
26 echo 'Mounting root filesystem rw failed; startup aborted'
27 stop_boot true
30 esac
31 umount -a >/dev/null 2>&1
32 return 0
35 load_rc_config $name
36 run_rc_command "$1"