1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

Only load one_tm in onevm for recover --interactive

This commit is contained in:
Javi Fontan 2015-09-03 19:03:25 +02:00
parent 9a4ea9caeb
commit 809fa79aa7

View File

@ -28,7 +28,6 @@ $: << MAD_LOCATION
require 'one_helper'
require 'optparse/time'
require 'one_tm'
class String
def red
@ -340,6 +339,16 @@ class OneVMHelper < OpenNebulaHelper::OneHelper
}
def recover_retry_interactive(vm)
begin
require 'one_tm'
rescue LoadError
STDERR.puts <<-EOT
one_tm library not found. Make sure you execute recover --interactive
in the frontend machine.
EOT
exit(-1)
end
# Disable CTRL-C in the menu
trap("SIGINT") { }