sshfs-mapper: test liveness of map.
git-svn-id: https://websvn.glenux.net/svn/Upoc/sshfs-mapper/trunk@1666 eaee96b3-f302-0410-b096-c6cfd47f7835
This commit is contained in:
parent
4d0af395ee
commit
80f2efb64b
1 changed files with 10 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue