mountcritlocal revision 136224
1#!/bin/sh 2# 3# $NetBSD: mountcritlocal,v 1.7 2002/04/29 12:29:53 lukem Exp $ 4# $FreeBSD: head/etc/rc.d/mountcritlocal 136224 2004-10-07 13:55:26Z mtm $ 5# 6 7# PROVIDE: mountcritlocal 8# REQUIRE: root 9# KEYWORD: nojail 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 nfs filesystems. 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 38 case $? in 39 0) 40 ;; 41 *) 42 echo 'Mounting /etc/fstab filesystems failed,' \ 43 ' startup aborted' 44 kill -QUIT $$ 45 ;; 46 esac 47} 48 49load_rc_config $name 50run_rc_command "$1" 51