mountcritlocal revision 174438
1#!/bin/sh
2#
3# $FreeBSD: head/etc/rc.d/mountcritlocal 174438 2007-12-08 07:20:23Z dougb $
4#
5
6# PROVIDE: mountcritlocal
7# REQUIRE: root
8# KEYWORD: nojail
9
10. /etc/rc.subr
11
12name="mountcritlocal"
13start_cmd="mountcritlocal_start"
14stop_cmd=":"
15
16mountcritlocal_start()
17{
18	# Set up the list of network filesystem types for which mounting
19	# should be delayed until after network initialization.
20	case ${extra_netfs_types} in
21	[Nn][Oo])
22		;;
23	*)
24		netfs_types="${netfs_types} ${extra_netfs_types}"
25		;;
26	esac
27
28	# Mount everything except nfs filesystems.
29	echo -n 'Mounting local file systems:'
30	mount_excludes='no'
31	for i in ${netfs_types}; do
32		fstype=${i%:*}
33		mount_excludes="${mount_excludes}${fstype},"
34	done
35	mount_excludes=${mount_excludes%,}
36	mount -a -t ${mount_excludes}
37	echo '.'
38
39	case $? in
40	0)
41		;;
42	*)
43		echo 'Mounting /etc/fstab filesystems failed,' \
44		    ' startup aborted'
45		stop_boot true
46		;;
47	esac
48}
49
50load_rc_config $name
51run_rc_command "$1"
52