zfs revision 168686
1168410Spjd#!/bin/sh 2168410Spjd# 3168410Spjd# $FreeBSD: head/etc/rc.d/zfs 168686 2007-04-13 11:02:06Z pjd $ 4168410Spjd# 5168410Spjd 6168410Spjd# PROVIDE: zfs 7168410Spjd# REQUIRE: mountcritlocal 8168410Spjd# KEYWORD: nojail shutdown 9168410Spjd 10168410Spjd. /etc/rc.subr 11168410Spjd 12168410Spjdname="zfs" 13168410Spjdrcvar="zfs_enable" 14168410Spjdstart_cmd="zfs_start" 15168410Spjdstop_cmd="zfs_stop" 16168410Spjdrequired_modules="zfs" 17168410Spjd 18168410Spjdzfs_start() 19168410Spjd{ 20168686Spjd zfs volinit 21168410Spjd zfs mount -a 22168410Spjd zfs share -a 23168686Spjd if [ ! -r /etc/zfs/exports ]; then 24168686Spjd touch /etc/zfs/exports 25168686Spjd fi 26168410Spjd} 27168410Spjd 28168410Spjdzfs_stop() 29168410Spjd{ 30168410Spjd zfs unshare -a 31168686Spjd zfs unmount -a 32168410Spjd zfs volfini 33168410Spjd} 34168410Spjd 35168410Spjdload_rc_config $name 36168410Spjdrun_rc_command "$1" 37