1#!/bin/sh 2#
| 1#!/bin/sh 2#
|
3# $FreeBSD: head/etc/rc.d/mountcritlocal 174438 2007-12-08 07:20:23Z dougb $
| 3# $FreeBSD: head/etc/rc.d/mountcritlocal 176873 2008-03-06 14:39:33Z mtm $
|
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{
| 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 local err 19
|
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}
| 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 echo -n 'Mounting local file systems:' 32 mount_excludes='no' 33 for i in ${netfs_types}; do 34 fstype=${i%:*} 35 mount_excludes="${mount_excludes}${fstype}," 36 done 37 mount_excludes=${mount_excludes%,} 38 mount -a -t ${mount_excludes}
|
| 39 err=$?
|
37 echo '.' 38
| 40 echo '.' 41
|
39 case $? in
| 42 case ${err} 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"
| 43 0) 44 ;; 45 *) 46 echo 'Mounting /etc/fstab filesystems failed,' \ 47 ' startup aborted' 48 stop_boot true 49 ;; 50 esac 51} 52 53load_rc_config $name 54run_rc_command "$1"
|