From bd9930b35d7ee506e11ad4e54591c16609c1be4e Mon Sep 17 00:00:00 2001 From: steve Date: Wed, 29 Nov 2006 19:27:18 +0000 Subject: [PATCH] 2006-11-29 19:27:18 by steve Added --config argument + filename parsing to xt-install-image + xen-create-image --- misc/xen-tools | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/misc/xen-tools b/misc/xen-tools index 4a46742..d6d12fd 100644 --- a/misc/xen-tools +++ b/misc/xen-tools @@ -18,7 +18,7 @@ # -- # http://www.steve.org.uk # -# $Id: xen-tools,v 1.37 2006-11-29 19:25:52 steve Exp $ +# $Id: xen-tools,v 1.38 2006-11-29 19:27:18 steve Exp $ # @@ -53,7 +53,7 @@ _xen_create_image() COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} - opts='--accounts --broadcast --boot --cache --debootstrap --dhcp --dir --dist --evms --force --fs --gateway --help --hostname --ide --image --initrd --ip --kernel --lvm --mac --manual --memory --mirror --noswap --p2p --passwd --role --rpmstrap --size --swap --version --verbose' + opts='--accounts --broadcast --boot --cache --config --debootstrap --dhcp --dir --dist --evms --force --fs --gateway --help --hostname --ide --image --initrd --ip --kernel --lvm --mac --manual --memory --mirror --noswap --p2p --passwd --role --rpmstrap --size --swap --version --verbose' # @@ -85,8 +85,8 @@ _xen_create_image() COMPREPLY=( $( compgen -W 'yes no' -- "${COMP_WORDS[COMP_CWORD]}" ) ) return 0 ;; - --image) - COMPREPLY=( $( compgen -W 'sparse full' -- "${COMP_WORDS[COMP_CWORD]}" ) ) + --config) + _filedir return 0 ;; --dir) @@ -105,6 +105,10 @@ _xen_create_image() COMPREPLY=( $( compgen -W 'xfs ext3 reiserfs' -- "${COMP_WORDS[COMP_CWORD]}" ) ) return 0 ;; + --image) + COMPREPLY=( $( compgen -W 'sparse full' -- "${COMP_WORDS[COMP_CWORD]}" ) ) + return 0 + ;; --ip) ip=`echo ${ip} | sed -e 's/[.][^.]*$/./'` COMPREPLY=( $(compgen -W "${ip}" -- ${cur}) ) @@ -362,7 +366,7 @@ _xt-install-image() COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} - opts='--copy --cache --debootstrap --dist --help --location --manual --mirror --rpmstrap --tar --verbose --version' + opts='--copy --cache --config --debootstrap --dist --help --location --manual --mirror --rpmstrap --tar --verbose --version' # @@ -378,6 +382,10 @@ _xt-install-image() COMPREPLY=( $( compgen -W 'yes no' -- "${COMP_WORDS[COMP_CWORD]}" ) ) return 0 ;; + --config) + _filedir + return 0 + ;; --copy) _filedir -d return 0