Add quoting variable for vnname.
The script can be call with quoted param. It's mandatory to get the mac of only one vm. example: tripleo get-vm-mac " instack-server " Change-Id: I3168c2c63c2d87aa243ab819b9977ec659721026
This commit is contained in:
parent
7461b01e39
commit
a100a94494
@ -8,9 +8,9 @@ if [ "$#" -lt 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VMNAME=$1
|
||||
VMNAME="$1"
|
||||
|
||||
vms=$(sudo virsh list --all | grep $VMNAME | awk '{ print $2 }')
|
||||
vms=$(sudo virsh list --all | grep "$VMNAME" | awk '{ print $2 }')
|
||||
|
||||
macs=""
|
||||
for vm in $vms ; do
|
||||
|
Loading…
x
Reference in New Issue
Block a user