Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/OpenNebula/one-swap
Browse files Browse the repository at this point in the history
  • Loading branch information
onenhansen committed Jul 10, 2024
2 parents 514d958 + 9c01362 commit de949db
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
15 changes: 11 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion oneswap
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion oneswap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit de949db

Please sign in to comment.