From: Silvio Rhatto Date: Thu, 4 Jun 2015 02:11:50 +0000 (-0300) Subject: TODO: vbox_exec and zerofree commands X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=64073966bb1f1629706d35cd2096e7519deaed4c;p=vbox.git TODO: vbox_exec and zerofree commands --- diff --git a/vbox b/vbox index 327a620..6b6935a 100755 --- a/vbox +++ b/vbox @@ -14,6 +14,11 @@ function usage { exit 1 } +# TODO +# Execute commands inside a virtual machine +#function vbox_exec { +#} + # Build options if [ ! -z "$VM" ]; then if [ "$COMMAND" == "up" ]; then @@ -29,6 +34,19 @@ if [ ! -z "$VM" ]; then OPTIONS="execute --username vagrant --password vagrant --image /home/vagrant/apps/hydra/hydractl" OPTIONS="$OPTIONS --verbose --wait-exit --wait-stdout --wait-stderr -- upgrade clean" COMMAND="guestcontrol" + # TODO + #elif [ "$COMMAND" == "zerofree" ]; then + # vbox_exec $VM apt-get install zerofree + # vbox_exec $VM apt-get clean + # vbox_exec $VM telinit 1 + # vbox_exec $VM mount -o remount,ro / + # vbox_exec $VM zerofree /dev/sda1 + # vbox_exec $VM halt + # VBoxManage modifyhd --compact /var/cache/virtualbox/$box/$box.vdi + # exit + #elif [ "$COMMAND" == "zerofree" ]; then + # shift + # vbox_exec $* else usage fi