summaryrefslogtreecommitdiff
path: root/user/fuse3/fuse.initd
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2018-09-15 23:01:33 -0400
committerMax Rees <maxcrees@me.com>2018-09-17 15:51:25 -0400
commit5c620e978b63c54067156fbce424034923f1358c (patch)
tree9ce8a259ac53a27e71f425941b8f63c52ca02155 /user/fuse3/fuse.initd
parent4c945103914cdd7091fe9aa1878923582f2e9972 (diff)
downloadpackages-5c620e978b63c54067156fbce424034923f1358c.tar.gz
packages-5c620e978b63c54067156fbce424034923f1358c.tar.bz2
packages-5c620e978b63c54067156fbce424034923f1358c.tar.xz
packages-5c620e978b63c54067156fbce424034923f1358c.zip
user/fuse3: new package
Diffstat (limited to 'user/fuse3/fuse.initd')
-rw-r--r--user/fuse3/fuse.initd35
1 files changed, 35 insertions, 0 deletions
diff --git a/user/fuse3/fuse.initd b/user/fuse3/fuse.initd
new file mode 100644
index 000000000..6c99929c2
--- /dev/null
+++ b/user/fuse3/fuse.initd
@@ -0,0 +1,35 @@
+#!/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 ${?}
+
+}