You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
757 B
36 lines
757 B
#!/sbin/openrc-run
|
|
# 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 ${?}
|
|
|
|
}
|