]> gitweb.fluxo.info Git - vbox.git/commitdiff
TODO: vbox_exec and zerofree commands
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 4 Jun 2015 02:11:50 +0000 (23:11 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 4 Jun 2015 02:11:50 +0000 (23:11 -0300)
vbox

diff --git a/vbox b/vbox
index 327a620c560ad4125440fd9ed15fbd6e4833a739..6b6935a1bc3464183df93c1acc654dbaa5febb70 100755 (executable)
--- 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