diff --git a/VBox_extensions/install_extensions b/VBox_extensions/install_extensions index 153a8a2..429f25e 100755 --- a/VBox_extensions/install_extensions +++ b/VBox_extensions/install_extensions @@ -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 diff --git a/VBox_extensions/power_check b/VBox_extensions/power_check index 0c56e06..e9e0718 100755 --- a/VBox_extensions/power_check +++ b/VBox_extensions/power_check @@ -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}" diff --git a/VBox_extensions/power_down b/VBox_extensions/power_down index a1fbee6..bad1667 100755 --- a/VBox_extensions/power_down +++ b/VBox_extensions/power_down @@ -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}" diff --git a/VBox_extensions/power_off b/VBox_extensions/power_off index eedf73a..508eab7 100755 --- a/VBox_extensions/power_off +++ b/VBox_extensions/power_off @@ -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}" diff --git a/VBox_extensions/power_on b/VBox_extensions/power_on index cdf6fd0..d527210 100755 --- a/VBox_extensions/power_on +++ b/VBox_extensions/power_on @@ -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}"