3 # fuse Init script for Filesystem in Userspace
5 # Author: Miklos Szeredi <miklos@szeredi.hu>
9 PATH
=/usr
/local
/sbin
:/usr
/local
/bin
:/sbin
:/bin
:/usr
/sbin
:/usr
/bin
10 SCRIPTNAME
=/etc
/init.d
/fuse
12 MOUNTPOINT
=/sys
/fs
/fuse
/connections
14 # Gracefully exit if the package has been removed.
15 test -x `which fusermount` ||
exit 0
25 echo -n "Starting $DESC: "
26 if ! grep -qw fuse
/proc
/filesystems
; then
27 modprobe fuse
>/dev
/null
2>&1 || error
"loading fuse module"
29 if grep -qw fusectl
/proc
/filesystems
&& \
30 ! grep -qw $MOUNTPOINT /proc
/mounts
; then
31 mount
-t fusectl none
$MOUNTPOINT >/dev
/null
2>&1 || \
32 error
"mounting control filesystem"
37 echo -n "Stopping $DESC: "
38 if grep -qw $MOUNTPOINT /proc
/mounts
; then
39 umount
$MOUNTPOINT >/dev
/null
2>&1 || \
40 error
"unmounting control filesystem"
42 if grep -qw "^fuse" /proc
/modules
; then
43 rmmod fuse
>/dev
/null
2>&1 || error
"unloading fuse module"
48 echo "Usage: $SCRIPTNAME {start|stop}" >&2