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
|
#!/usr/bin/ruby
|
||||||
# vim: set ts=2 sw=2 :
|
|
||||||
|
|
||||||
$DEBUG = true
|
$DEBUG = true
|
||||||
$VERBOSE = true
|
$VERBOSE = true
|
||||||
|
@ -19,10 +18,12 @@ module SshfsMapper
|
||||||
@active_maps = nil
|
@active_maps = nil
|
||||||
|
|
||||||
puts "-- sshfs-mapper --"
|
puts "-- sshfs-mapper --"
|
||||||
conf = Config.new
|
@config = Config.new
|
||||||
conf.parse_cmd_line ARGV
|
@config.parse_cmd_line ARGV
|
||||||
@all_maps = conf.parse_file
|
@config.parse_file
|
||||||
puts conf
|
|
||||||
|
@all_maps = {}
|
||||||
|
pp @config
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,14 +34,15 @@ module SshfsMapper
|
||||||
|
|
||||||
def run_mount
|
def run_mount
|
||||||
|
|
||||||
selected_maps = if @config.all_maps @all_maps
|
# asynchronous mount
|
||||||
|
selected_maps = @config.maps.select do |map|
|
||||||
@all_maps.each do |map|
|
|
||||||
pp map
|
pp map
|
||||||
|
map.online?
|
||||||
# if map.available? then
|
# if map.available? then
|
||||||
# map.connect!
|
# map.connect!
|
||||||
# end
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def run_umount
|
def run_umount
|
||||||
|
|
Loading…
Reference in a new issue