mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
M #-: Minor adjustements in ruby library load
This commit is contained in:
parent
95ab571b95
commit
cccfec2b21
@ -16,14 +16,14 @@
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
ONE_LOCATION = ENV['ONE_LOCATION'] if !defined?(ONE_LOCATION)
|
||||
ONE_LOCATION ||= ENV['ONE_LOCATION']
|
||||
|
||||
if !ONE_LOCATION
|
||||
RUBY_LIB_LOCATION = '/usr/lib/one/ruby' if !defined?(RUBY_LIB_LOCATION)
|
||||
GEMS_LOCATION = '/usr/share/one/gems' if !defined?(GEMS_LOCATION)
|
||||
RUBY_LIB_LOCATION ||= '/usr/lib/one/ruby'
|
||||
GEMS_LOCATION ||= '/usr/share/one/gems'
|
||||
else
|
||||
RUBY_LIB_LOCATION = ONE_LOCATION + '/lib/ruby' if !defined?(RUBY_LIB_LOCATION)
|
||||
GEMS_LOCATION = ONE_LOCATION + '/share/gems' if !defined?(GEMS_LOCATION)
|
||||
RUBY_LIB_LOCATION ||= ONE_LOCATION + '/lib/ruby'
|
||||
GEMS_LOCATION ||= ONE_LOCATION + '/share/gems'
|
||||
end
|
||||
|
||||
if File.directory?(GEMS_LOCATION)
|
||||
@ -51,5 +51,3 @@ rescue StandardError => e
|
||||
STDERR.puts "IM poll for NSX cluster #{host_id} failed due to "\
|
||||
"\"#{e.message}\"\n#{e.backtrace}"
|
||||
end
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
ONE_LOCATION = ENV['ONE_LOCATION'] unless defined? ONE_LOCATION
|
||||
ONE_LOCATION ||= ENV['ONE_LOCATION']
|
||||
|
||||
if !ONE_LOCATION
|
||||
RUBY_LIB_LOCATION ||= '/usr/lib/one/ruby'
|
||||
|
@ -16,7 +16,7 @@
|
||||
# limitations under the License. #
|
||||
# -------------------------------------------------------------------------- #
|
||||
|
||||
ONE_LOCATION ||= ENV['ONE_LOCATION'] unless defined? ONE_LOCATION
|
||||
ONE_LOCATION ||= ENV['ONE_LOCATION']
|
||||
|
||||
if !ONE_LOCATION
|
||||
RUBY_LIB_LOCATION ||= '/usr/lib/one/ruby'
|
||||
|
@ -16,7 +16,7 @@
|
||||
# limitations under the License. #
|
||||
# -------------------------------------------------------------------------- #
|
||||
|
||||
ONE_LOCATION = ENV['ONE_LOCATION'] unless defined? ONE_LOCATION
|
||||
ONE_LOCATION ||= ENV['ONE_LOCATION']
|
||||
|
||||
if !ONE_LOCATION
|
||||
RUBY_LIB_LOCATION ||= '/usr/lib/one/ruby'
|
||||
|
@ -370,7 +370,7 @@ helpers do
|
||||
if !two_factor_auth_token || two_factor_auth_token == ""
|
||||
return [202, { code: "two_factor_auth", uid: user.id }.to_json]
|
||||
end
|
||||
serverResponse =
|
||||
serverResponse =
|
||||
isTwoFactorAuthSuccessful = false
|
||||
if isHOTPConfigured && Sunstone2FAuth.authenticate(user[TWO_FACTOR_AUTH_SECRET_XPATH], two_factor_auth_token)
|
||||
isTwoFactorAuthSuccessful = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user