From 80f2efb64b22eb60a689b7f7a1f1b8b1fa80f7b9 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Tue, 15 Mar 2011 16:58:13 +0000 Subject: [PATCH] sshfs-mapper: test liveness of map. git-svn-id: https://websvn.glenux.net/svn/Upoc/sshfs-mapper/trunk@1666 eaee96b3-f302-0410-b096-c6cfd47f7835 --- sshfs-mapper.rb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/sshfs-mapper.rb b/sshfs-mapper.rb index f2d2dfd..5bcb6c9 100755 --- a/sshfs-mapper.rb +++ b/sshfs-mapper.rb @@ -1,5 +1,4 @@ #!/usr/bin/ruby -# vim: set ts=2 sw=2 : $DEBUG = true $VERBOSE = true @@ -19,10 +18,12 @@ module SshfsMapper @active_maps = nil puts "-- sshfs-mapper --" - conf = Config.new - conf.parse_cmd_line ARGV - @all_maps = conf.parse_file - puts conf + @config = Config.new + @config.parse_cmd_line ARGV + @config.parse_file + + @all_maps = {} + pp @config end @@ -33,14 +34,15 @@ module SshfsMapper def run_mount - selected_maps = if @config.all_maps @all_maps - - @all_maps.each do |map| + # asynchronous mount + selected_maps = @config.maps.select do |map| pp map + map.online? # if map.available? then # map.connect! # end end + end def run_umount