summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2018-03-19 07:11:36 -0400
committerTim Harder <radhermit@gentoo.org>2018-03-19 07:31:11 -0400
commitd30a5e26942969a14ee1266189d8769fdc07a0fe (patch)
treefd8507438c6c773e03f40976fc66835ce7de2b1d /sys-fs/fuse-common/files
parentdev-python/boto3: amd64 stable wrt bug #650598 (diff)
downloadgentoo-d30a5e26942969a14ee1266189d8769fdc07a0fe.tar.gz
gentoo-d30a5e26942969a14ee1266189d8769fdc07a0fe.tar.bz2
gentoo-d30a5e26942969a14ee1266189d8769fdc07a0fe.zip
sys-fs/fuse-common: initial import
Diffstat (limited to 'sys-fs/fuse-common/files')
-rw-r--r--sys-fs/fuse-common/files/fuse-fbsd.init23
-rw-r--r--sys-fs/fuse-common/files/fuse.init35
2 files changed, 58 insertions, 0 deletions
diff --git a/sys-fs/fuse-common/files/fuse-fbsd.init b/sys-fs/fuse-common/files/fuse-fbsd.init
new file mode 100644
index 000000000000..27d90cc867f3
--- /dev/null
+++ b/sys-fs/fuse-common/files/fuse-fbsd.init
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+}
+
+start() {
+ ebegin "Starting fuse"
+ if ! kldstat -q -m fuse; then
+ kldload fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module"
+ fi
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping fuse"
+ if kldstat -q -m fuse; then
+ kldunload fuse >/dev/null 2>&1 || eerror $? "Error unloading fuse module"
+ fi
+ eend ${?}
+}
diff --git a/sys-fs/fuse-common/files/fuse.init b/sys-fs/fuse-common/files/fuse.init
new file mode 100644
index 000000000000..6c99929c2266
--- /dev/null
+++ b/sys-fs/fuse-common/files/fuse.init
@@ -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 ${?}
+
+}