Permalink
Browse files

1.7 compatibility and bug fixing

Fixed a bug in the power_* scripts
  • Loading branch information...
izoratti committed Mar 18, 2015
1 parent 1e79727 commit e879a267cee4d4776c6866d9c293db5942fa62f2
@@ -27,6 +27,7 @@
#
# Date Who Description
# 2015-01-01 Ivan Zoratti First Version
# 2015-03-18 Ivan Zoratti Save the original template and install teh new one
#
# @endverbatim
#
@@ -48,6 +49,12 @@ chmod 600 ~/VBox_extensions/maas-api-key
# Copy the Wake-On-LAN / VirtualBox template
echo "Copying the Wake-On-LAN / VirtualBox template..."
if [ ! -e /etc/maas/templates/power/ether_wake.orig ]
then
sudo mv /etc/maas/templates/power/ether_wake.template /etc/maas/templates/power/ether_wake.orig
fi
sudo cp -f ~/VBox_extensions/ether_wake.template /etc/maas/templates/power/ether_wake.template
# Generate the id_rsa_pub key
@@ -28,6 +28,7 @@
#
# Date Who Description
# 2015-01-01 Ivan Zoratti First Version
# 2015-03-18 Ivan Zoratti Fixed Bug - "-" were not removed from uuid
#
# @endverbatim
#
@@ -50,7 +51,7 @@ do
if [[ ${vbox_host_credentials} == *"@"* ]]
then
# Create the command string
command_to_execute="ssh ${vbox_host_credentials} '~/VBox_host_extensions/checkvm ${vm_to_check}'"
command_to_execute="ssh ${vbox_host_credentials} '~/VBox_host_extensions/checkvm ${vm_to_check//-}'"
# Execute the command string
eval "${command_to_execute}"
@@ -28,6 +28,7 @@
#
# Date Who Description
# 2015-01-01 Ivan Zoratti First Version
# 2015-03-18 Ivan Zoratti Fixed Bug - "-" were not removed from uuid
#
# @endverbatim
#
@@ -49,7 +50,7 @@ do
if [[ ${vbox_host_credentials} == *"@"* ]]
then
# Create the command string
command_to_execute="ssh ${vbox_host_credentials} '~/VBox_host_extensions/stopvm ${vm_to_stop}'"
command_to_execute="ssh ${vbox_host_credentials} '~/VBox_host_extensions/stopvm ${vm_to_stop//-}'"
# Execute the command string
eval "${command_to_execute}"
@@ -28,6 +28,7 @@
#
# Date Who Description
# 2015-01-01 Ivan Zoratti First Version
# 2015-03-18 Ivan Zoratti Fixed Bug - "-" were not removed from uuid
#
# @endverbatim
#
@@ -48,7 +49,7 @@ do
if [[ ${vbox_host_credentials} == *"@"* ]]
then
# Create the command string
command_to_execute="ssh ${vbox_host_credentials} '~/VBox_host_extensions/killvm ${vm_to_kill}'"
command_to_execute="ssh ${vbox_host_credentials} '~/VBox_host_extensions/killvm ${vm_to_kill//-}'"
# Execute the command string
eval "${command_to_execute}"
@@ -48,7 +48,7 @@ do
if [[ ${vbox_host_credentials} == *"@"* ]]
then
# Create the command string
command_to_execute="ssh ${vbox_host_credentials} '~/VBox_host_extensions/startvm ${vm_to_start}'"
command_to_execute="ssh ${vbox_host_credentials} '~/VBox_host_extensions/startvm ${vm_to_start//-}'"
# Execute the command string
eval "${command_to_execute}"

0 comments on commit e879a26

Please sign in to comment.