mount.fuse

来自「UNIX/LINUX下面的用户文件系统」· FUSE 代码 · 共 49 行

FUSE
49
字号
#!/bin/bash## FUSE mount helper# Petr Klima <qaxi@seznam.cz># Thanks to Miklos Szeredi <miklos@szeredi.hu># to kick me to the right way#VERSION="0.0.1"PRGNAME=`basename $0`USAGE="${PRGNAME} version ${VERSION}usage: ${PRGNAME} fusefs_type#[mountpath] mountpoint [FUSE options]	example: ${PRGNAME} sshfs#root@tux:/ /mnt/tuxssh -o rw"function die {	echo -e "$PRGNAME# $1" >&2	[ -z "$2" ] && exit 128	exit "$2"}[ "$#" -ge 2 ] || die "${USAGE}"FSTYPE=${1%%\#*} # for now i have to be same as FUSE mount binary		 # should be configurableexport PATHFSBIN=`which ${FSTYPE} 2>/dev/null` \	|| die "Can not find FUSE mount binary for FS ${FSTYPE}" 1MOUNTPATH=${1#*#}# was there an # in $1[ "$1" = "$MOUNTPATH" ] && MOUNTPATH=""MOUNTPOINT="$2"[ -d "${MOUNTPOINT}" ] || die "Directory ${MOUNTPOINT} does not exist"shiftshiftignore_opts="(user|nouser|users|auto|noauto|_netdev)"OPTIONS=`echo $@ | sed -r "s/(,${ignore_opts}|${ignore_opts},)//g"`${FSTYPE} ${MOUNTPATH} ${MOUNTPOINT} ${OPTIONS}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?