blob: f2ae98c7e4bd7968f5562264e6fc7e6e98f4f176 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs-fuse/files/9999/zfs-fuse.rc,v 1.2 2008/09/25 16:29:02 trapni Exp $
depend() {
need localmount
before net
}
PIDFILE="/var/run/zfs/zfs-fuse.pid"
EXEFILE="/usr/sbin/zfs-fuse"
checksystem() {
return 0 # TODO
}
start() {
ebegin "Starting ZFS-FUSE"
checksystem || return 1
start-stop-daemon --start --exec ${EXEFILE} \
--user daemon --group disk -- --pidfile ${PIDFILE}
rv=$?
eend $rv
if [[ $rv -eq 0 ]]; then
ebegin "Mounting ZFS filesystems"
zfs mount -a
eend $?
fi
}
stop() {
ebegin "Unmounting ZFS filesystems"
zfs umount -f -a
eend $?
ebegin "Stopping ZFS-FUSE"
checksystem || return 2
start-stop-daemon --stop --pidfile ${PIDFILE} \
--exec ${EXEFILE} --retry TERM/1/TERM/2/TERM/4/TERM/8/KILL
eend $?
}
|