shell is not my first language
This commit is contained in:
parent
d91600b031
commit
f85f282854
@ -15,7 +15,7 @@ ipv4_address="$4"
|
|||||||
# for some reason libvirt appears to remember every dhcp lease even after it has expired.
|
# for some reason libvirt appears to remember every dhcp lease even after it has expired.
|
||||||
# adding a new ip-dhcp-host will fail if there already is one with the same ip address.
|
# adding a new ip-dhcp-host will fail if there already is one with the same ip address.
|
||||||
# so we will try to delete any that already exist with that IP address just in case!
|
# so we will try to delete any that already exist with that IP address just in case!
|
||||||
if [ "$action" == 'add' ]; then
|
if [ "$action" = 'add' ]; then
|
||||||
printf "trying to delete any existing (probably expired) dhcp associations for $ipv4_address..."
|
printf "trying to delete any existing (probably expired) dhcp associations for $ipv4_address..."
|
||||||
virsh net-update "$network_name" delete ip-dhcp-host "<host ip='$ipv4_address' />" --live --config || true
|
virsh net-update "$network_name" delete ip-dhcp-host "<host ip='$ipv4_address' />" --live --config || true
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user