diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-03-23 04:19:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-03-23 04:19:44 +0000 |
commit | c5283d322accc6097afec74eab24550829788bab (patch) | |
tree | b99ce668128d82a026eaa31461643f9173f9b77b /sys-fs/fuse-common/files | |
parent | 5510d9d7d1c93c2ea71a2bd6f0666168808d5dd6 (diff) |
gentoo resync : 23.03.2018
Diffstat (limited to 'sys-fs/fuse-common/files')
-rw-r--r-- | sys-fs/fuse-common/files/fuse-fbsd.init | 23 | ||||
-rw-r--r-- | sys-fs/fuse-common/files/fuse.init | 35 |
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 ${?} + +} |