Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 176365 | Differences between
and this patch

Collapse All | Expand All

(-)/sbin/mount.fuse (-8 / +20 lines)
Lines 6-12 Link Here
6
# to kick me to the right way
6
# to kick me to the right way
7
#
7
#
8
8
9
VERSION="0.0.1"
9
VERSION="0.0.2"
10
PRGNAME=`basename $0`
10
PRGNAME=`basename $0`
11
11
12
if [ -z "$HOME" ]; then
12
if [ -z "$HOME" ]; then
Lines 20-27 Link Here
20
	example: ${PRGNAME} sshfs#root@tux:/ /mnt/tuxssh -o rw
20
	example: ${PRGNAME} sshfs#root@tux:/ /mnt/tuxssh -o rw
21
"
21
"
22
22
23
function die {
23
die {
24
	echo -e "$PRGNAME# $1" >&2
24
	echo "$PRGNAME# $1" >&2
25
	[ -z "$2" ] && exit 128
25
	[ -z "$2" ] && exit 128
26
	exit "$2"
26
	exit "$2"
27
}
27
}
Lines 45-52 Link Here
45
shift
45
shift
46
shift
46
shift
47
47
48
ignore_opts='\(user\|nouser\|users\|auto\|noauto\|_netdev\)'
48
# loop over each mount option and skip all that should be ignored
49
49
IFS=","
50
OPTIONS=`echo $@ | sed "s/,${ignore_opts}\|${ignore_opts},//g"`
50
for OPT in $@; do
51
51
	OPT=`echo $OPT | sed "s/^\(-o\|user\|nouser\|users\|auto\|noauto\|_netdev\)$/IGNORE/"`
52
${FSTYPE} ${MOUNTPATH} ${MOUNTPOINT} ${OPTIONS}
52
	if [ "$OPT" == "IGNORE" ]; then continue; fi
53
	OPTIONS="$OPTIONS$OPT,"
54
done
55
IFS=" "
56
57
# add "-o " and remove trailing comma
58
OPTIONS="-o `echo $OPTIONS | sed "s/,$//"`"
59
60
if test -z "$MOUNTPATH"; then
61
    "${FSTYPE}" "${MOUNTPOINT}" ${OPTIONS}
62
else
63
    "${FSTYPE}" "${MOUNTPATH}" "${MOUNTPOINT}" ${OPTIONS}
64
fi

Return to bug 176365