Better parsing of arguments passed to mount.fuse.ceph by mount command.

Signed-off-by: Florent Bautista <florent@coppint.com>
This commit is contained in:
Florent 2016-02-11 14:51:49 +01:00
parent 4056ee298a
commit 8fe75846bd

View File

@ -19,11 +19,23 @@ set -e
# convert device string to options
cephargs='--'`echo $1 | sed 's/,/ --/g'`
# get mount point
mountpoint=$2
shift 2
while [ "$1" != "-o" ]
do
shift
done
opts=$2
# strip out 'noauto' option; libfuse doesn't like it
opts=`echo $4 | sed 's/,noauto//' | sed 's/noauto,//'`
opts=`echo $opts | sed 's/,noauto//' | sed 's/noauto,//'`
# strip out '_netdev' option; libfuse doesn't like it
opts=`echo $opts | sed 's/,_netdev//' | sed 's/_netdev,//'`
# go
exec ceph-fuse $cephargs $2 $3 $opts
exec ceph-fuse $cephargs $mountpoint -o $opts