From 9c01362bc8b70027971b5305c21d884fcbbb55b6 Mon Sep 17 00:00:00 2001 From: Neal <92747003+onenhansen@users.noreply.github.com> Date: Wed, 10 Jul 2024 16:03:35 -0600 Subject: [PATCH] F #-: improvements for 1.2 (#33) Signed-off-by: Neal Hansen --- install.sh | 15 +++++++++++---- oneswap | 2 +- oneswap.yaml | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 3f6a351..b631d1d 100755 --- a/install.sh +++ b/install.sh @@ -24,20 +24,27 @@ function usage { function link_install { echo "Creating symbolic links." - ln -s `pwd`/oneswap /usr/bin/oneswap + unlink /usr/local/bin/oneswap + unlink /usr/lib/one/ruby/cli/one_helper/oneswap_helper.rb + unlink /var/lib/one/oneswap.yaml + ln -s `pwd`/oneswap /usr/local/bin/oneswap ln -s `pwd`/oneswap_helper.rb /usr/lib/one/ruby/cli/one_helper/oneswap_helper.rb + ln -s `pwd`/oneswap.yaml /var/lib/one/oneswap.yaml chmod +x `pwd`/oneswap - ls -lh /usr/bin/oneswap + ls -lh /usr/local/bin/oneswap ls -lh /usr/lib/one/ruby/cli/one_helper/oneswap_helper.rb + ls -lh /var/lib/one/oneswap.yaml } function copy_install { echo "Copying files for install." - cp -f `pwd`/oneswap /usr/bin/oneswap + cp -f `pwd`/oneswap /usr/local/bin/oneswap cp -f `pwd`/oneswap_helper.rb /usr/lib/one/ruby/cli/one_helper/oneswap_helper.rb + cp -f `pwd`/oneswap.yaml /var/lib/one/oneswap.yaml chmod +x `pwd`/oneswap - ls -lh /usr/bin/oneswap + ls -lh /usr/local/bin/oneswap ls -lh /usr/lib/one/ruby/cli/one_helper/oneswap_helper.rb + ls -lh /var/lib/one/oneswap.yaml } while getopts "lc" option; do diff --git a/oneswap b/oneswap index deae65f..efd1a86 100644 --- a/oneswap +++ b/oneswap @@ -523,7 +523,7 @@ CommandParser::CmdParser.new(ARGV) do command :convert, conv_desc, :vm_name, :options => CONVERT_OPTS do begin if options[:config_file] && !File.exist?(options[:config_file]) - raise "Unable to find the config file at #{options[:config_file]}" + puts "Unable to find the config file at #{options[:config_file]}" end options[:config_file] ||= '/var/lib/one/oneswap.yaml' cfg_file = YAML.load_file(options[:config_file]) if File.exist?(options[:config_file]) diff --git a/oneswap.yaml b/oneswap.yaml index 8bde5b4..b314aad 100644 --- a/oneswap.yaml +++ b/oneswap.yaml @@ -62,4 +62,4 @@ #:memory_max: # Memory max in MB #:vcpu_max: # vCPU max allowed in integer format. CPU Hot Add required in VMWare. #:cpu: # Physical CPU allowed in integer format. Default: match CPU cores from vCenter -#:vcpu: # vCPU allowed in integer format. Default: match CPU cores from vCener +#:vcpu: # vCPU allowed in integer format. Default: match CPU cores from vCenter