Skip to content

Commit

Permalink
1.7 compatibility and bug fixing
Browse files Browse the repository at this point in the history
Fixed a bug in the power_* scripts
  • Loading branch information
izoratti committed Mar 18, 2015
1 parent 1e79727 commit e879a26
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
7 changes: 7 additions & 0 deletions VBox_extensions/install_extensions
Expand Up @@ -27,6 +27,7 @@
# #
# Date Who Description # Date Who Description
# 2015-01-01 Ivan Zoratti First Version # 2015-01-01 Ivan Zoratti First Version
# 2015-03-18 Ivan Zoratti Save the original template and install teh new one
# #
# @endverbatim # @endverbatim
# #
Expand All @@ -48,6 +49,12 @@ chmod 600 ~/VBox_extensions/maas-api-key


# Copy the Wake-On-LAN / VirtualBox template # Copy the Wake-On-LAN / VirtualBox template
echo "Copying 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 sudo cp -f ~/VBox_extensions/ether_wake.template /etc/maas/templates/power/ether_wake.template


# Generate the id_rsa_pub key # Generate the id_rsa_pub key
Expand Down
3 changes: 2 additions & 1 deletion VBox_extensions/power_check
Expand Up @@ -28,6 +28,7 @@
# #
# Date Who Description # Date Who Description
# 2015-01-01 Ivan Zoratti First Version # 2015-01-01 Ivan Zoratti First Version
# 2015-03-18 Ivan Zoratti Fixed Bug - "-" were not removed from uuid
# #
# @endverbatim # @endverbatim
# #
Expand All @@ -50,7 +51,7 @@ do
if [[ ${vbox_host_credentials} == *"@"* ]] if [[ ${vbox_host_credentials} == *"@"* ]]
then then
# Create the command string # 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 # Execute the command string
eval "${command_to_execute}" eval "${command_to_execute}"


Expand Down
3 changes: 2 additions & 1 deletion VBox_extensions/power_down
Expand Up @@ -28,6 +28,7 @@
# #
# Date Who Description # Date Who Description
# 2015-01-01 Ivan Zoratti First Version # 2015-01-01 Ivan Zoratti First Version
# 2015-03-18 Ivan Zoratti Fixed Bug - "-" were not removed from uuid
# #
# @endverbatim # @endverbatim
# #
Expand All @@ -49,7 +50,7 @@ do
if [[ ${vbox_host_credentials} == *"@"* ]] if [[ ${vbox_host_credentials} == *"@"* ]]
then then
# Create the command string # 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 # Execute the command string
eval "${command_to_execute}" eval "${command_to_execute}"


Expand Down
3 changes: 2 additions & 1 deletion VBox_extensions/power_off
Expand Up @@ -28,6 +28,7 @@
# #
# Date Who Description # Date Who Description
# 2015-01-01 Ivan Zoratti First Version # 2015-01-01 Ivan Zoratti First Version
# 2015-03-18 Ivan Zoratti Fixed Bug - "-" were not removed from uuid
# #
# @endverbatim # @endverbatim
# #
Expand All @@ -48,7 +49,7 @@ do
if [[ ${vbox_host_credentials} == *"@"* ]] if [[ ${vbox_host_credentials} == *"@"* ]]
then then
# Create the command string # 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 # Execute the command string
eval "${command_to_execute}" eval "${command_to_execute}"


Expand Down
2 changes: 1 addition & 1 deletion VBox_extensions/power_on
Expand Up @@ -48,7 +48,7 @@ do
if [[ ${vbox_host_credentials} == *"@"* ]] if [[ ${vbox_host_credentials} == *"@"* ]]
then then
# Create the command string # 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 # Execute the command string
eval "${command_to_execute}" eval "${command_to_execute}"


Expand Down

0 comments on commit e879a26

Please sign in to comment.