zfs revision 168686
1#!/bin/sh 2# 3# $FreeBSD: head/etc/rc.d/zfs 168686 2007-04-13 11:02:06Z pjd $ 4# 5 6# PROVIDE: zfs 7# REQUIRE: mountcritlocal 8# KEYWORD: nojail shutdown 9 10. /etc/rc.subr 11 12name="zfs" 13rcvar="zfs_enable" 14start_cmd="zfs_start" 15stop_cmd="zfs_stop" 16required_modules="zfs" 17 18zfs_start() 19{ 20 zfs volinit 21 zfs mount -a 22 zfs share -a 23 if [ ! -r /etc/zfs/exports ]; then 24 touch /etc/zfs/exports 25 fi 26} 27 28zfs_stop() 29{ 30 zfs unshare -a 31 zfs unmount -a 32 zfs volfini 33} 34 35load_rc_config $name 36run_rc_command "$1" 37