vrrpd: test if interface exists before deleting it

This commit is contained in:
Jérémy Lecour 2023-12-20 15:27:07 +01:00 committed by Jérémy Lecour
parent 4a1b94f55d
commit 046f1411b3
Signed by: jlecour
SSH key fingerprint: SHA256:h+5LgHRKwN9lS0SsdVR5yZPeFlJE4Mt+8UtL4CcP8dY
2 changed files with 5 additions and 2 deletions

View file

@ -25,6 +25,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
* remount-usr: do not try to remount /usr RW if /usr is not a mounted partition * remount-usr: do not try to remount /usr RW if /usr is not a mounted partition
* minifirewall: Fix nagios check for old versions of minifirewall * minifirewall: Fix nagios check for old versions of minifirewall
* autosysadmin: Add a role to automatically deploy autosysadmin on evolixisation * autosysadmin: Add a role to automatically deploy autosysadmin on evolixisation
* vrrpd: test if interface exists before deleting it
### Changed ### Changed

View file

@ -72,8 +72,10 @@ case "${STATE}" in
;; ;;
"slave" ) "slave" )
# Delete interface # Delete interface if it exists
ip link delete "${VIRTUAL_INTERFACE_NAME}" if ip link show "${VIRTUAL_INTERFACE_NAME}" >/dev/null 2>&1; then
ip link delete "${VIRTUAL_INTERFACE_NAME}"
fi
;; ;;
* ) * )