66 lines
1.3 KiB
Plaintext
66 lines
1.3 KiB
Plaintext
|
#!/bin/sh
|
||
|
#
|
||
|
# zfs-fuse Filesystem in the Userspace port of Solaris' ZFS
|
||
|
#
|
||
|
# chkconfig: 345 90 10
|
||
|
# description: A port of ZFS to the FUSE framework for the Linux operating system
|
||
|
#
|
||
|
# Copyright (c) 2007 by Stefano Cotta Ramusino <stefano.cotta@openmamba.org>
|
||
|
|
||
|
. /etc/sysconfig/rc
|
||
|
. $rc_functions
|
||
|
|
||
|
NAME=zfs-fuse
|
||
|
DAEMON=/usr/sbin/$NAME
|
||
|
DAEMONPID=/var/run/$NAME.pid
|
||
|
LOCKFILE=/var/lock/subsys/$NAME
|
||
|
|
||
|
[ -x $DAEMON ] || exit 0
|
||
|
|
||
|
running() {
|
||
|
status $NAME > /dev/null
|
||
|
}
|
||
|
|
||
|
# See how we were called.
|
||
|
case "$1" in
|
||
|
start)
|
||
|
if ! running; then
|
||
|
echo -n $"Starting $NAME daemon: "
|
||
|
daemon --pidfile=$DAEMONPID $DAEMON -p $DAEMONPID
|
||
|
[ $? -eq 0 ] && touch $LOCKFILE
|
||
|
else
|
||
|
echo -n $"Service $NAME already running."
|
||
|
fi
|
||
|
echo
|
||
|
;;
|
||
|
stop)
|
||
|
if running; then
|
||
|
echo -n $"Shutting down $NAME daemon: "
|
||
|
killproc -p $DAEMONPID $DAEMON
|
||
|
[ $? -eq 0 ] && rm -f $LOCKFILE $DAEMONPID
|
||
|
else
|
||
|
echo -n $"Service $NAME not running."
|
||
|
fi
|
||
|
echo
|
||
|
;;
|
||
|
restart)
|
||
|
$0 stop
|
||
|
$0 start
|
||
|
;;
|
||
|
condstop)
|
||
|
[ -e $LOCKFILE ] && $0 stop || :
|
||
|
;;
|
||
|
condrestart)
|
||
|
[ -e $LOCKFILE ] && $0 restart || :
|
||
|
;;
|
||
|
status)
|
||
|
status $NAME
|
||
|
;;
|
||
|
*)
|
||
|
echo $"Usage: $0 {start|stop|restart|condstop|condrestart|status}"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
:
|