Группа :: Система/Ядро и оборудование
Пакет: fuse-zfs
Главная Изменения Спек Патчи Исходники Загрузить Gear Bugs and FR Repocop
#!/bin/sh
#
# fuse-zfs Filesystem in the Userspace port of Solaris' zfs
#
# chkconfig: 345 90 10
# description: ZFS is an advanced modern general-purpose filesystem from Sun Microsystems, originally designed for Solaris/OpenSolaris.\
# This project is a port of ZFS to the FUSE framework for the Linux operating system.\
# It was sponsored by Google, as part of the Google Summer of Code 2006 program.
# processname: zfs-fuse
# config:
# pidfile: /var/run/zfs-fuse.pid
# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1
# Source function library.
. /etc/init.d/functions
PIDFILE=/var/run/zfs-fuse.pid
LOCKFILE=/var/lock/subsys/zfs-fuse
ZFS_FUSE_BIN=/usr/sbin/zfs-fuse
RETVAL=0
start()
{
/bin/lsmod | grep '^fuse' || /sbin/modprobe fuse
start_daemon --lockfile "$LOCKFILE" --expect-user root -- "$ZFS_FUSE_BIN" --pidfile "$PIDFILE"
RETVAL=$?
return $RETVAL
}
stop()
{
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- "$ZFS_FUSE_BIN"
RETVAL=$?
return $RETVAL
}
restart()
{
stop
start
}
reload()
{
msg_reloading fuse-zfs
stop_daemon --pidfile "$PIDFILE" --expect-user root -HUP -- "$ZFS_FUSE_BIN"
RETVAL=$?
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
reload
;;
restart)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
condreload)
if [ -e "$LOCKFILE" ]; then
reload
fi
;;
status)
status --pidfile "$PIDFILE" --expect-user root -- "$ZFS_FUSE_BIN"
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
RETVAL=1
esac
exit $RETVAL