diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-01-20 15:51:50 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-01-20 15:53:25 +0000 |
commit | 7a0b6bcc0bc61677944d7ab3f8e635347fd32353 (patch) | |
tree | fe30af7d9fffc65291d2cc84832315e8cd50f94d /testing/fuse/fuse.initd | |
parent | 8ead7a5dd2a21b3c51cab6f740c6f63c9fe31896 (diff) | |
download | aports-7a0b6bcc0bc61677944d7ab3f8e635347fd32353.tar.bz2 aports-7a0b6bcc0bc61677944d7ab3f8e635347fd32353.tar.xz |
testing/fuse: new aport
A library that makes it possible to implement a filesystem in a userspace program.
http://fuse.sourceforge.net/
Needed by sshfs (ref #210) and open-vm-tools (ref #193)
Diffstat (limited to 'testing/fuse/fuse.initd')
-rw-r--r-- | testing/fuse/fuse.initd | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/testing/fuse/fuse.initd b/testing/fuse/fuse.initd new file mode 100644 index 00000000..30b512e8 --- /dev/null +++ b/testing/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 ${?} + +} |