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# 6 7# PROVIDE: mountcritlocal 8# REQUIRE: root 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 for network filesystems. 29 # 30 mount_excludes="" 31 for i in ${netfs_types}; do 32 fstype=${i%:*} 33 mount_excludes="${mount_excludes}${fstype}," 34 done 35 debug "mount -a -t no${mount_excludes%,}" 36 mount -a -t no${mount_excludes%,} 37 err=$? 38 if [ ${err} -ne 0 ]; then 39 echo 'Mounting /etc/fstab filesystems failed; startup aborted' 40 stop_boot true 41 fi 42} 43 44load_rc_config $name 45run_rc_command "$1" 46