#!/bin/sh # # zfs-fuse 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. ### BEGIN INIT INFO # Provides: zfs-fuse # Required-Start: fuse # Required-Stop: fuse # Default-Start: 3 4 5 # Short-Description: Filesystem in the Userspace port of Solaris' zfs # Description: Filesystem in the Userspace port of Solaris' zfs ### END INIT INFO # Source function library. . /etc/init.d/functions prog="zfs-fuse" PIDFILE=/var/run/zfs-fuse.pid LOCKFILE=/var/lock/subsys/zfs-fuse ZFS_FUSE_BIN=/usr/sbin/zfs-fuse [ -f /usr/sbin/zfs-fuse ] || exit 0 RETVAL=0 start() { gprintf "Starting %s: " "$prog" daemon $prog -p "$PIDFILE" echo [ $RETVAL -eq 0 ] && touch "$LOCKFILE" return $RETVAL } stop() { gprintf "Stopping %s: " "$prog" killproc -p $PIDFILE $proc RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f "$LOCKFILE" "$PIDFILE" return $RETVAL } restart() { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart|reload) restart ;; condstop) if [ -e "$LOCKFILE" ]; then stop fi ;; condrestart) if [ -e "$LOCKFILE" ]; then restart fi ;; condreload) if [ -e "$LOCKFILE" ]; then reload fi ;; status) status $prog ;; *) gprintf "Usage: %s {start|stop|reload|restart|condstop|condrestart|condreload|status}\n" "$0" exit 1 esac exit $RETVAL