From c0ff35b03a848c86509325735543b1ec3ac2dc80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20Logerais=20=28Numericable=20-=20Ing=C3=A9nierie?= =?UTF-8?q?=20Syst=C3=A8me=29?= Date: Wed, 21 May 2014 11:27:26 +0200 Subject: [PATCH 1/2] Modified virtualization.bash! --- libs/virtualization.bash | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/virtualization.bash b/libs/virtualization.bash index 7ed8d3e..5503cb7 100755 --- a/libs/virtualization.bash +++ b/libs/virtualization.bash @@ -121,14 +121,15 @@ vm_change_bridge() { vm_add_data_disk() { - if [ $# -ne 2 ]; then echo "Usage : $0 hypervisor_name_or_ip vm_name size"; return 1; fi + if [ $# -ne 3 ]; then echo "Usage : $0 hypervisor_name_or_ip vm_name size (in Gb)"; return 1; fi hypervisor=${1} name=${2} - size=${3} + size=$(( ${3} * 1024 * 1024 * 1024 )) virsh --connect=qemu+ssh://${USER}@${hypervisor}/system pool-list + virsh --connect=qemu+ssh://${USER}@${hypervisor}/system domblklist ${name} virsh --connect=qemu+ssh://${USER}@${hypervisor}/system vol-create-as --pool guests_data --name ${name} --capacity ${size} --format raw - virsh --connect=qemu+ssh://${USER}@${hypervisor}/system attach-disk ${name} /dev/lvm_guests_data/${name} vdb --cache writethrough + virsh --connect=qemu+ssh://${USER}@${hypervisor}/system attach-disk ${name} /dev/lvm_guests_data/${name} vdb --cache writethrough --persistent virsh --connect=qemu+ssh://${USER}@${hypervisor}/system domblklist ${name} } From 166d03114ba6ff40d389d7b800141f651db2111f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20Logerais=20=28Numericable=20-=20Ing=C3=A9nierie?= =?UTF-8?q?=20Syst=C3=A8me=29?= Date: Wed, 21 May 2014 11:29:04 +0200 Subject: [PATCH 2/2] Modified todo.txt --- rc.d/todo.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rc.d/todo.txt b/rc.d/todo.txt index 8eab41f..ee0e851 100644 --- a/rc.d/todo.txt +++ b/rc.d/todo.txt @@ -2,9 +2,13 @@ if [ -f ~/software/todo.txt-cli/todo.sh ]; then - source ~/software/todo.txt-cli/todo_completion export TODOTXT_DEFAULT_ACTION=ls + source ~/software/todo.txt-cli/todo_completion + + alias todo.sh='~/software/todo.txt-cli/todo.sh' + complete -F _todo todo.sh + alias todo='~/software/todo.txt-cli/todo.sh' complete -F _todo todo