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 lvm cryptdisks 9# BEFORE: FILESYSTEMS 10 11. /etc/rc.subr 12 13name="mountcritlocal" 14start_cmd="mountcritlocal_start" 15stop_cmd=":" 16 17mountcritlocal_start() 18{ 19 # Set up the list of network filesystem types for which mounting 20 # should be delayed until after network initialization. 21 case ${extra_netfs_types} in 22 [Nn][Oo]) 23 ;; 24 *) 25 netfs_types="${netfs_types} ${extra_netfs_types}" 26 ;; 27 esac 28 29 # Mount everything except for network filesystems. 30 # 31 mount_excludes="" 32 for i in ${netfs_types}; do 33 fstype=${i%:*} 34 mount_excludes="${mount_excludes}${fstype}," 35 done 36 debug "mount -a -t no${mount_excludes%,}" 37 mount -a -t no${mount_excludes%,} 38 err=$? 39 if [ ${err} -ne 0 ]; then 40 echo 'Mounting /etc/fstab filesystems failed; startup aborted' 41 stop_boot true 42 fi 43} 44 45load_rc_config $name 46run_rc_command "$1" 47