# HG changeset patch # User taiki # Date 1384782620 36000 # Node ID d8ea207162ca9042f5121edc408de0056b13b516 # Parent f194adc597b64a90ea42359d14e8eac02ac6e571 add box command, and box add, box list diff -r f194adc597b6 -r d8ea207162ca TODO --- a/TODO Tue Nov 12 01:50:50 2013 -1000 +++ b/TODO Mon Nov 18 03:50:20 2013 -1000 @@ -1,8 +1,9 @@ -chown login users directory +*chown login users directory mount .vagrant.d network configration *export VAGRANT_HOME=/root/.vagrant.d/ *export VAGRANT_DEFAULT_PROVIDER=kvm -list box for user understand users box +*list box for user understand users box +*add box for user understand users box diff -r f194adc597b6 -r d8ea207162ca ie-vagrant.c --- a/ie-vagrant.c Tue Nov 12 01:50:50 2013 -1000 +++ b/ie-vagrant.c Mon Nov 18 03:50:20 2013 -1000 @@ -31,6 +31,11 @@ #define up_command "up" #define destroy_command "destroy" #define ssh_command "ssh" +#define box_command "box" + +#define box_add_command "add" +#define box_list_command "list" + #define provider_arg "--provider=kvm" #define NEW(type) ((type*)malloc(sizeof(type))) @@ -121,6 +126,16 @@ if (execl(command, command, destroy_command, NULL) < 0) { perror("Execl:"); } + } else if ( strncmp(argv[1], "box", 3) == 0 ) { + if ( strncmp(argv[2], "add", 3) == 0 ) { + if (execl(command, command, box_add_command, NULL) < 0) { + perror("Execl:"); + } + } else if (strncmp(argv[2], "list", 4) == 0 ) { + if (execl(command, command, box_command, box_list_command, NULL) < 0) { + perror("Execl:"); + } + } } else if ( strncmp(argv[1], "up", 2) == 0 ) { if (execl(command, command, up_command, provider_arg, NULL) < 0) { perror("Execl:");