#! /bin/sh

### BEGIN INIT INFO
# Provides: $local_fs
# Required-Start: mtab
# Required-Stop:
# Default-Start: S
# Default-Stop:
# X-Start-Before: mountall
# X-Stop-Before:
# Short-Description: Mount ZFS filesystems
# Description: Run the 'zfs mount -a' or 'zfs umount -a' command.
### END INIT INFO

PATH=/usr/sbin:/usr/bin:/sbin:/bin

. /lib/lsb/init-functions

case $1 in start)
	log_begin_msg "Mounting ZFS filesystems"
	log_progress_msg "filesystems"
	zfs mount -a
	log_end_msg $RET
;; stop)
	log_begin_msg "Unmounting ZFS filesystems"
	log_progress_msg "filesystems"
	zfs unmount -a
	log_end_msg $RET
;; force-reload|reload|restart|status)
	# no-op
;; *)
	echo "Usage: $0 {start|stop}"
	exit 3
esac
