From ec16d8dafe3bd21941737126b818b4af6423f048 Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Tue, 21 Jul 2015 16:49:47 +0200 Subject: [PATCH] Point hybrid polling to the correct location of their respective drivers --- src/im_mad/remotes/az.d/poll | 10 +++++++++- src/im_mad/remotes/ec2.d/poll | 10 +++++++++- src/im_mad/remotes/sl.d/poll | 10 +++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/im_mad/remotes/az.d/poll b/src/im_mad/remotes/az.d/poll index 0aca1b10bf..50692211cc 100755 --- a/src/im_mad/remotes/az.d/poll +++ b/src/im_mad/remotes/az.d/poll @@ -16,7 +16,15 @@ # limitations under the License. # # -------------------------------------------------------------------------- # -$: << File.join(File.dirname(__FILE__), '../../vmm/az') +ONE_LOCATION=ENV["ONE_LOCATION"] if !defined?(ONE_LOCATION) + +if !ONE_LOCATION + RUBY_LIB_LOCATION="/usr/lib/one/ruby" if !defined?(RUBY_LIB_LOCATION) +else + RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" if !defined?(RUBY_LIB_LOCATION) +end + +$: << RUBY_LIB_LOCATION require 'az_driver' diff --git a/src/im_mad/remotes/ec2.d/poll b/src/im_mad/remotes/ec2.d/poll index d49c0cb2da..8e7e0abd19 100755 --- a/src/im_mad/remotes/ec2.d/poll +++ b/src/im_mad/remotes/ec2.d/poll @@ -16,7 +16,15 @@ # limitations under the License. # # -------------------------------------------------------------------------- # -$: << File.join(File.dirname(__FILE__), '../../vmm/ec2') +ONE_LOCATION=ENV["ONE_LOCATION"] if !defined?(ONE_LOCATION) + +if !ONE_LOCATION + RUBY_LIB_LOCATION="/usr/lib/one/ruby" if !defined?(RUBY_LIB_LOCATION) +else + RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" if !defined?(RUBY_LIB_LOCATION) +end + +$: << RUBY_LIB_LOCATION require 'ec2_driver' diff --git a/src/im_mad/remotes/sl.d/poll b/src/im_mad/remotes/sl.d/poll index 74c2a68c05..40c28ab74e 100755 --- a/src/im_mad/remotes/sl.d/poll +++ b/src/im_mad/remotes/sl.d/poll @@ -16,7 +16,15 @@ # limitations under the License. # # -------------------------------------------------------------------------- # -$: << File.join(File.dirname(__FILE__), '../../vmm/sl') +ONE_LOCATION=ENV["ONE_LOCATION"] if !defined?(ONE_LOCATION) + +if !ONE_LOCATION + RUBY_LIB_LOCATION="/usr/lib/one/ruby" if !defined?(RUBY_LIB_LOCATION) +else + RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" if !defined?(RUBY_LIB_LOCATION) +end + +$: << RUBY_LIB_LOCATION require 'sl_driver'