From d76ca46773d2759e483cbd04337abbd2a8005658 Mon Sep 17 00:00:00 2001 From: Michael Meffie Date: Mon, 12 Aug 2019 15:12:26 -0400 Subject: [PATCH] Add missing -l and -L options kvm-install-vm remove Add the -l and -L options to the kvm-install-vm remove command to specify the paths to the images and guest files. Those options are required if they were given in the previous kvm-install-vm create command, otherwise the remove will fail to remove the items created with the custom paths. --- kvm-install-vm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kvm-install-vm b/kvm-install-vm index ff8d7bf..11f5fc2 100755 --- a/kvm-install-vm +++ b/kvm-install-vm @@ -107,6 +107,8 @@ function usage_subcommand () printf " help - show this help\n" printf "\n" printf "OPTIONS\n" + printf " -l Location of Images (default: $HOME/virt/images)\n" + printf " -L Location of VMs (default: $HOME/virt/vms)\n" printf " -v Be verbose\n" printf "\n" printf "EXAMPLE\n" @@ -642,9 +644,11 @@ _EOF_ function remove () { # Parse command line arguments - while getopts ":hv" opt + while getopts ":l:L:hv" opt do case "$opt" in + l ) IMAGEDIR="${OPTARG}" ;; + L ) VMDIR="${OPTARG}" ;; v ) VERBOSE=1 ;; h ) usage ;; * ) die "Unsupported option. Run 'kvm-install-vm help remove'." ;;