4 # Petr Klima <qaxi@seznam.cz>
5 # Thanks to Miklos Szeredi <miklos@szeredi.hu>
6 # to kick me to the right way
12 USAGE
="${PRGNAME} version ${VERSION}
13 usage: ${PRGNAME} fusefs_type#[mountpath] mountpoint [FUSE options]
15 example: ${PRGNAME} sshfs#root@tux:/ /mnt/tuxssh -o rw
19 echo -e "$PRGNAME# $1" >&2
20 [ -z "$2" ] && exit 128
24 [ "$#" -ge 2 ] || die
"${USAGE}"
26 FSTYPE
=${1%%\#*} # for now i have to be same as FUSE mount binary
27 # should be configurable
30 FSBIN
=`which ${FSTYPE} 2>/dev/null` \
31 || die
"Can not find FUSE mount binary for FS ${FSTYPE}" 1
35 # was there an # in $1
36 [ "$1" = "$MOUNTPATH" ] && MOUNTPATH
=""
39 [ -d "${MOUNTPOINT}" ] || die
"Directory ${MOUNTPOINT} does not exist"
44 ignore_opts
="(user|nouser|users|auto|noauto|_netdev)"
46 OPTIONS
=`echo $@ | sed -r "s/(,${ignore_opts}|${ignore_opts},)//g"`
48 ${FSTYPE} ${MOUNTPATH} ${MOUNTPOINT} ${OPTIONS}