From 64073966bb1f1629706d35cd2096e7519deaed4c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 3 Jun 2015 23:11:50 -0300 Subject: TODO: vbox_exec and zerofree commands --- vbox | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 -- cgit v1.2.3