From 5e4cf3a35443844b98d04cc12f57559ab99024fb Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Thu, 18 Jun 2009 16:18:18 +0000 Subject: [PATCH] sshfs-mapper: Auto will be disabled by default (prepare option). git-svn-id: https://websvn.glenux.net/svn/Upoc/sshfs-mapper/trunk@1390 eaee96b3-f302-0410-b096-c6cfd47f7835 --- sshfs-mapper | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sshfs-mapper b/sshfs-mapper index ab0ee5b..c6b2b1c 100644 --- a/sshfs-mapper +++ b/sshfs-mapper @@ -105,10 +105,14 @@ EOF SSHFS_HOST_PATTERN=" " SSHFS_HOST_LIMIT=0 SSHFS_HOST_LIST=0 +SSHFS_HOST_AUTO=0 #TODO:while getopts h:u o -while getopts hiuls: o +while getopts ahiuls: o do case "$o" in + a) # mount all + SSHFS_HOST_AUTO=1 + ;; i) # init (copy config files in user HOME) do_initialize ;; @@ -170,6 +174,10 @@ for map_file in `find "$SSHFS_DIR" -type f -name '*.map' `; do if ! echo "$SSHFS_HOST_PATTERN" | grep -q " `basename ${map_file/.map/}` " ; then continue fi + else + if [ $SSHFS_HOST_AUTO -eq 0 ]; then + continue + fi fi remote_host=$( read_conf $map_file REMOTE_HOST ) remote_user=$( read_conf $map_file REMOTE_USER )