config root man

Current Path : /compat/linux/proc/self/root/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 : //compat/linux/proc/self/root/etc/rc.d/zfs

#!/bin/sh
#
# $FreeBSD: release/9.1.0/etc/rc.d/zfs 195938 2009-07-29 05:23:52Z pjd $
#

# PROVIDE: zfs
# REQUIRE: mountcritlocal

. /etc/rc.subr

name="zfs"
rcvar="zfs_enable"
start_cmd="zfs_start"
stop_cmd="zfs_stop"
required_modules="zfs"

zfs_start_jail()
{
	if [ `$SYSCTL_N security.jail.mount_allowed` -eq 1 ]; then
		zfs mount -a
	fi
}

zfs_start_main()
{
	zfs mount -a
	zfs share -a
	if [ ! -r /etc/zfs/exports ]; then
		touch /etc/zfs/exports
	fi
}

zfs_start()
{
	if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then
		zfs_start_jail
	else
		zfs_start_main
	fi
}

zfs_stop_jail()
{
	if [ `$SYSCTL_N security.jail.mount_allowed` -eq 1 ]; then
		zfs unmount -a
	fi
}

zfs_stop_main()
{
	zfs unshare -a
	zfs unmount -a
}

zfs_stop()
{
	if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then
		zfs_stop_jail
	else
		zfs_stop_main
	fi
}

load_rc_config $name
run_rc_command "$1"

Man Man