summaryrefslogtreecommitdiff
path: root/user/fuse3/fuse.initd
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2018-09-18 02:00:09 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2018-09-18 02:00:09 +0000
commit3eef3c84f5d830f3621d5326577f25bb925abca6 (patch)
tree33a61eeb7b2ccb634d670df35c35a0997c4f2f8e /user/fuse3/fuse.initd
parentd079f866e1a31f54e0c3f3d76f2f5cc6380a77cb (diff)
parenta13a5cba375dbb9b56d0df2d9f1a78d4709d50a8 (diff)
downloadpackages-3eef3c84f5d830f3621d5326577f25bb925abca6.tar.gz
packages-3eef3c84f5d830f3621d5326577f25bb925abca6.tar.bz2
packages-3eef3c84f5d830f3621d5326577f25bb925abca6.tar.xz
packages-3eef3c84f5d830f3621d5326577f25bb925abca6.zip
Merge branch 'sshfs' into 'master'
Add fuse3, sshfs, and some undeclared dependencies for py3-pytest See merge request !60
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 ${?}
+
+}