sshfs-mapper: Added verbosity option.

git-svn-id: https://websvn.glenux.net/svn/Upoc/sshfs-mapper/trunk@1623 eaee96b3-f302-0410-b096-c6cfd47f7835
This commit is contained in:
glenux 2010-05-22 17:52:19 +00:00
parent 0a090db765
commit 73410ea881

View file

@ -32,6 +32,7 @@ do_mount() {
local localdir=$2 local localdir=$2
local remoteport=$3 local remoteport=$3
set -x
sshfs \ sshfs \
-o allow_root \ -o allow_root \
-o idmap=user \ -o idmap=user \
@ -46,6 +47,7 @@ do_mount() {
-o Port=$remoteport \ -o Port=$remoteport \
$remotedir \ $remotedir \
$localdir $localdir
set +x
#-o compression=yes #-o compression=yes
} }
@ -65,6 +67,7 @@ Usage: `basename $0` [options]
-a, --all Use all maps. -a, --all Use all maps.
-s, --select <map> Only use specified map. -s, --select <map> Only use specified map.
-u, --umount Umount user maps (mount if not specified). -u, --umount Umount user maps (mount if not specified).
-v, --verbose Be verbose.
EOF EOF
exit 1 exit 1
} }
@ -109,6 +112,7 @@ SSHFS_HOST_PATTERN=" "
SSHFS_HOST_LIMIT=0 SSHFS_HOST_LIMIT=0
SSHFS_HOST_LIST=0 SSHFS_HOST_LIST=0
SSHFS_HOST_AUTO=0 SSHFS_HOST_AUTO=0
SSHFS_VERBOSE=0
OPTFOUND=0 OPTFOUND=0
while true while true
do do
@ -118,6 +122,9 @@ do
OPTARG=${1:-} OPTARG=${1:-}
#echo "$OPT?" #echo "$OPT?"
case "$OPT" in case "$OPT" in
--verbose|-v) #be verbose
SSHFS_VERBOSE=1
;;
--all|-a) # mount all --all|-a) # mount all
SSHFS_HOST_AUTO=1 SSHFS_HOST_AUTO=1
OPTFOUND=1 OPTFOUND=1