diff --git a/src/im_mad/remotes/lib/probe_db.rb b/src/im_mad/remotes/lib/probe_db.rb index 5c4a68cc05..220e098a11 100644 --- a/src/im_mad/remotes/lib/probe_db.rb +++ b/src/im_mad/remotes/lib/probe_db.rb @@ -1,5 +1,4 @@ #!/usr/bin/ruby - # -------------------------------------------------------------------------- # # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems # # # @@ -15,40 +14,6 @@ # See the License for the specific language governing permissions and # # limitations under the License. # #--------------------------------------------------------------------------- # - -ONE_LOCATION = ENV['ONE_LOCATION'] if !defined? ONE_LOCATION - -if !ONE_LOCATION - RUBY_LIB_LOCATION ||= '/usr/lib/one/ruby' - GEMS_LOCATION ||= '/usr/share/one/gems' -else - RUBY_LIB_LOCATION ||= ONE_LOCATION + '/lib/ruby' - GEMS_LOCATION ||= ONE_LOCATION + '/share/gems' -end - -# %%RUBYGEMS_SETUP_BEGIN%% -if File.directory?(GEMS_LOCATION) - real_gems_path = File.realpath(GEMS_LOCATION) - if !defined?(Gem) || Gem.path != [real_gems_path] - $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ } - - # Suppress warnings from Rubygems - # https://github.com/OpenNebula/one/issues/5379 - begin - verb = $VERBOSE - $VERBOSE = nil - require 'rubygems' - Gem.use_paths(real_gems_path) - ensure - $VERBOSE = verb - end - end -end -# %%RUBYGEMS_SETUP_END%% - -$LOAD_PATH << RUBY_LIB_LOCATION -$LOAD_PATH << RUBY_LIB_LOCATION + '/cli' - require 'sqlite3' require 'yaml' require 'fileutils'