config root man

Current Path : /usr/src/etc/rc.d/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/src/etc/rc.d/mountcritremote

#!/bin/sh
#
# $FreeBSD: release/9.1.0/etc/rc.d/mountcritremote 223310 2011-06-19 22:48:40Z dougb $
#

# PROVIDE: mountcritremote
# REQUIRE: NETWORKING FILESYSTEMS cleanvar ipsec netwait
# KEYWORD: nojail

. /etc/rc.subr

name="mountcritremote"
stop_cmd=":"
start_cmd="mountcritremote_start"
start_precmd="mountcritremote_precmd"

# Mount NFS filesystems if present in /etc/fstab
#
# XXX When the vfsload() issues with nfsclient support and related sysctls
# have been resolved, this block can be removed, and the condition that
# skips nfs in the following block (for "other network filesystems") can
# be removed.
#
mountcritremote_precmd()
{
	case "`mount -d -a -t nfs 2> /dev/null`" in
	*mount_nfs*)
		# Handle absent nfs client support
		load_kld -m nfs nfscl || return 1
		;;
	esac
	return 0
}

mountcritremote_start()
{
	# Mount nfs filesystems.
	#
	case "`/sbin/mount -d -a -t nfs`" in
	'')
		;;
	*)
		echo -n 'Mounting NFS file systems:'
		mount -a -t nfs
		echo '.'
		;;
	esac

	# Mount other network filesystems if present in /etc/fstab.
	case ${extra_netfs_types} in
	[Nn][Oo])
		;;
	*)
		netfs_types="${netfs_types} ${extra_netfs_types}"
		;;
	esac

	for i in ${netfs_types}; do
		fstype=${i%:*}
		fsdecr=${i#*:}

		[ "${fstype}" = "nfs" ] && continue

		case "`mount -d -a -t ${fstype}`" in
		*mount_${fstype}*)
			echo -n "Mounting ${fsdecr} file systems:"
			mount -a -t ${fstype}
			echo '.'
			;;
		esac
	done

	# Cleanup /var again just in case it's a network mount.
	/etc/rc.d/cleanvar quietreload
	rm -f /var/run/clean_var /var/spool/lock/clean_var
}

load_rc_config $name
run_rc_command "$1"

Man Man