xref: /dragonfly/etc/rc.d/mountcritlocal (revision aa8d5dcb)
1#!/bin/sh
2#
3# $NetBSD: mountcritlocal,v 1.7 2002/04/29 12:29:53 lukem Exp $
4# $FreeBSD: src/etc/rc.d/mountcritlocal,v 1.5 2003/06/01 01:43:37 gordon Exp $
5# $DragonFly: src/etc/rc.d/mountcritlocal,v 1.4 2004/01/27 01:26:25 rob Exp $
6#
7
8# PROVIDE: mountcritlocal
9# REQUIRE: root
10# KEYWORD: DragonFly
11
12. /etc/rc.subr
13
14name="mountcritlocal"
15start_cmd="mountcritlocal_start"
16stop_cmd=":"
17
18mountcritlocal_start()
19{
20	# Set up the list of network filesystem types for which mounting
21	# should be delayed until after network initialization.
22	case ${extra_netfs_types} in
23	[Nn][Oo])
24	;;
25		*)
26		netfs_types="${netfs_types} ${extra_netfs_types}"
27			;;
28		esac
29
30	# Mount everything except nfs filesystems.
31	mount_excludes='no'
32	for i in ${netfs_types}; do
33		fstype=${i%:*}
34		mount_excludes="${mount_excludes}${fstype},"
35	done
36	mount_excludes=${mount_excludes%,}
37	mount -a -t ${mount_excludes}
38	case $? in
39	0)
40		;;
41	*)
42		echo 'Mounting /etc/fstab filesystems failed,' \
43			' startup aborted'
44		exit 1
45		;;
46		esac
47
48}
49
50load_rc_config $name
51run_rc_command "$1"
52