aports/testing/fuse/fuse.initd
Natanael Copa 7a0b6bcc0b testing/fuse: new aport
A library that makes it possible to implement a filesystem in a userspace program.
http://fuse.sourceforge.net/

Needed by sshfs (ref #210) and open-vm-tools (ref #193)
2010-01-20 15:53:25 +00:00

36 lines
756 B
Plaintext

#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
MOUNTPOINT=/sys/fs/fuse/connections
depend() {
need localmount
}
start() {
ebegin "Starting fuse"
if ! grep -qw fuse /proc/filesystems; then
modprobe fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module"
fi
if grep -qw fusectl /proc/filesystems && \
! grep -qw $MOUNTPOINT /proc/mounts; then
mount -t fusectl none $MOUNTPOINT >/dev/null 2>&1 || \
eerror $? "Error mounting control filesystem"
fi
eend ${?}
}
stop() {
ebegin "Stopping fuse"
if grep -qw $MOUNTPOINT /proc/mounts; then
umount $MOUNTPOINT >/dev/null 2>&1 || \
eerror $? "Error unmounting control filesystem"
fi
eend ${?}
}