diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-06-03 23:11:50 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-06-03 23:11:50 -0300 |
commit | 64073966bb1f1629706d35cd2096e7519deaed4c (patch) | |
tree | 3567ef2eed5a920e2232a8c077b691f1bf14df01 | |
parent | a414b8af0db1cc64f3c287e8684b20f7dadca181 (diff) | |
download | vbox-64073966bb1f1629706d35cd2096e7519deaed4c.tar.gz vbox-64073966bb1f1629706d35cd2096e7519deaed4c.tar.bz2 |
TODO: vbox_exec and zerofree commands
-rwxr-xr-x | vbox | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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 |