mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
net/keepalived: on virtual IP allow empty device option
If ip is referenced in the instance section it is not necessary to add a device option on every "ip_address". In most sitution it es enough to add only an ip. Allow empty device option will solve this issue. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
@@ -123,13 +123,17 @@ print_ipaddress_indent() {
|
|||||||
# Default indent
|
# Default indent
|
||||||
[ -z "$indent" ] && indent=$INDENT_1
|
[ -z "$indent" ] && indent=$INDENT_1
|
||||||
|
|
||||||
# If no address or device exit
|
# If no address exit
|
||||||
[ -z "$address" -o -z "$device" ] && return 0
|
[ -z "$address" ] && return 0
|
||||||
|
|
||||||
# Add IP address/netmask and device
|
if [ -z "$device" ]; then
|
||||||
printf "$indent$address dev $device" >> $KEEPALIVED_CONF
|
printf "$indent$address" >> $KEEPALIVED_CONF
|
||||||
# Add scope
|
else
|
||||||
[ -n "$scope" ] && printf " scope $scope" >> $KEEPALIVED_CONF
|
# Add IP address/netmask and device
|
||||||
|
printf "$indent$address dev $device" >> $KEEPALIVED_CONF
|
||||||
|
# Add scope
|
||||||
|
[ -n "$scope" ] && printf " scope $scope" >> $KEEPALIVED_CONF
|
||||||
|
fi
|
||||||
|
|
||||||
printf "\n" >> $KEEPALIVED_CONF
|
printf "\n" >> $KEEPALIVED_CONF
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user