From fb7f2816d84cd626f5218a6e08d29fb85065478d Mon Sep 17 00:00:00 2001 From: moogle Date: Sat, 30 Apr 2016 23:12:29 +0200 Subject: [PATCH] Fix handling of '-r' in iohyve clone The '-r' option was overriding the name in the iohyve clone function --- lib/ioh-zfs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ioh-zfs b/lib/ioh-zfs index 9038bb4..13512f5 100644 --- a/lib/ioh-zfs +++ b/lib/ioh-zfs @@ -117,6 +117,10 @@ __cloneguest() { local flag="$2" local name="$2" local cname="$3" + if [ "$flag" == "-r" ]; then + name="$3" + cname="$4" + fi local description="$(date | sed -e 's/ /_/g')" local pool="$(zfs list -H -t volume | grep iohyve/$name | grep disk0 | cut -d '/' -f 1 | head -n1)" # Check if guest exists