adding interface length safety
This commit is contained in:
parent
15c67eae20
commit
af873ce08e
|
@ -2,6 +2,11 @@
|
|||
set -Eeuo pipefail
|
||||
IFACE=$1
|
||||
|
||||
if [ ${#IFACE} -gt 14 ]; then
|
||||
echo "interface name too long, mac 14 char: $IFACE"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
source /etc/libvirt/hooks/$IFACE
|
||||
|
||||
if ! [[ $CLUSTER =~ ^[0-9]+$ ]]; then
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
set -Eeuo pipefail
|
||||
IFACE=$1
|
||||
|
||||
if [ ${#IFACE} -gt 14 ]; then
|
||||
echo "interface name too long, mac 14 char: $IFACE"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
source /etc/libvirt/hooks/$IFACE
|
||||
|
||||
### I need to keep this for backwards compatibility but PUBLICMAC should always be set since it absolutely needs to match the MAC the VM has been assigned by qemu. otherwise nothign will work
|
||||
|
|
Loading…
Reference in New Issue