diff options
author | pjd <pjd@FreeBSD.org> | 2007-04-06 02:27:02 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2007-04-06 02:27:02 +0000 |
commit | 4474431c34b1973b89b02a02cd54a55ea97648aa (patch) | |
tree | 4ee993e86835d9121b6e14210c1db11b2324ba9d /etc/rc.d/zfs | |
parent | 170e632d642afcedd747a3c8bdf45f63d1a36f53 (diff) | |
download | FreeBSD-src-4474431c34b1973b89b02a02cd54a55ea97648aa.zip FreeBSD-src-4474431c34b1973b89b02a02cd54a55ea97648aa.tar.gz |
- Add ZFS startup script.
Submitted by: des
- When starting mountd(8) and ZFS is enabled, add /etc/zfs/exports file.
- Update rc.conf(5).
Diffstat (limited to 'etc/rc.d/zfs')
-rw-r--r-- | etc/rc.d/zfs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/etc/rc.d/zfs b/etc/rc.d/zfs new file mode 100644 index 0000000..093f4c6 --- /dev/null +++ b/etc/rc.d/zfs @@ -0,0 +1,33 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: zfs +# REQUIRE: mountcritlocal +# KEYWORD: nojail shutdown + +. /etc/rc.subr + +name="zfs" +rcvar="zfs_enable" +start_cmd="zfs_start" +stop_cmd="zfs_stop" +required_modules="zfs" + +zfs_start() +{ + zfs mount -a + zfs volinit + zfs share -a +} + +zfs_stop() +{ + zfs unshare -a + zfs volfini + zfs unmount -a +} + +load_rc_config $name +run_rc_command "$1" |