3 # fuse-pl Start FUSE support on PlanetLab
6 # description: Updates node configuration files at startup
10 # Source function library.
11 . /etc/init.d/functions
13 : ${UTIL_VSERVER_VARS:=`echo /usr/lib*/util-vserver/util-vserver-vars`}
14 test -e "$UTIL_VSERVER_VARS" || {
15 echo "Can not find util-vserver installation; aborting..."
18 . "$UTIL_VSERVER_VARS"
21 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
22 MOUNTPOINT=/sys/fs/fuse/connections
27 # stolen from the /etc/init.d/fuse that comes with the fuse source
28 if ! grep -qw fuse /proc/filesystems; then
29 echo -n "Loading fuse module"
30 if ! modprobe fuse >/dev/null 2>&1; then
37 if grep -qw fusectl /proc/filesystems && \
38 ! grep -qw $MOUNTPOINT /proc/mounts; then
39 echo -n "Mounting fuse control filesystem"
40 if ! mount -t fusectl fusectl $MOUNTPOINT >/dev/null 2>&1; then
49 # To enable FUSE for existing slices, copy the FUSE device
51 if [ ! -e /dev/fuse ]; then
52 echo "No FUSE device! Exiting."
55 for slice in `ls $__CONFDIR`; do
56 cp -a /dev/fuse $__DEFAULT_VSERVERDIR/$slice/dev/ > /dev/null 2>&1
62 echo $"Usage: $0 {start|restart|stop}"