aboutsummaryrefslogtreecommitdiffstats
path: root/main/fuse/fuse.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-07-16 14:24:53 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-07-16 14:24:53 +0000
commit32441b10eaf9c5e6f7314af040cd557256b1d2da (patch)
tree8fadf0197f6f0f535ffce0cbbb0fdeabce4d6e91 /main/fuse/fuse.initd
parent35bae381d202f379dbe4fc6c9b187884764fdcfd (diff)
downloadaports-32441b10eaf9c5e6f7314af040cd557256b1d2da.tar.bz2
aports-32441b10eaf9c5e6f7314af040cd557256b1d2da.tar.xz
main/fuse: moved from testingv2.0.0_beta3
Diffstat (limited to 'main/fuse/fuse.initd')
-rw-r--r--main/fuse/fuse.initd35
1 files changed, 35 insertions, 0 deletions
diff --git a/main/fuse/fuse.initd b/main/fuse/fuse.initd
new file mode 100644
index 0000000000..30b512e8dc
--- /dev/null
+++ b/main/fuse/fuse.initd
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# 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 ${?}
+
+}