Gentoo Archives: gentoo-commits

From: "Naohiro Aota (naota)" <naota@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-freebsd/freebsd-cddl/files: zfs.initd
Date: Sun, 27 May 2012 06:23:42
Message-Id: 20120527062308.1327D2004B@flycatcher.gentoo.org
naota       12/05/27 06:23:08

  Added:                zfs.initd
  Log:
  Add zfs initd script. #415129
  
  (Portage version: 2.2.0_alpha100/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  sys-freebsd/freebsd-cddl/files/zfs.initd

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-cddl/files/zfs.initd?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-cddl/files/zfs.initd?rev=1.1&content-type=text/plain

Index: zfs.initd
===================================================================
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-cddl/files/zfs.initd,v 1.1 2012/05/27 06:23:07 naota Exp $

depend() {
	need hostid
	before fsck
}

start() {
	einfo "Starting zfs ..."
	zfs mount -a
	zfs share -a
	if [ ! -r /etc/zfs/exports ]; then
		touch /etc/zfs/exports
	fi
}

stop() {
	einfo "Stopping zfs ..."
	zfs unshare -a
	zfs unmount -a
}