You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
1.3 KiB
21 lines
1.3 KiB
--- a/heartbeat/findif.sh 2024-02-08 11:31:53.414257686 +0100
|
|
+++ b/heartbeat/findif.sh 2023-11-02 10:20:12.150853167 +0100
|
|
@@ -210,14 +210,14 @@
|
|
fi
|
|
findif_check_params $family || return $?
|
|
|
|
- if [ -n "$netmask" ] ; then
|
|
+ if [ -n "$netmask" ]; then
|
|
match=$match/$netmask
|
|
fi
|
|
if [ -n "$nic" ] ; then
|
|
# NIC supports more than two.
|
|
- set -- $(ip -o -f $family route list match $match $scope table "${OCF_RESKEY_table:=main}" | grep "dev $nic " | awk 'BEGIN{best=0} /\// { mask=$1; sub(".*/", "", mask); if( int(mask)>=best ) { best=int(mask); best_ln=$0; } } END{print best_ln}')
|
|
+ set -- $(ip -o -f $family route list match $match $scope | grep "dev $nic " | awk 'BEGIN{best=0} /\// { mask=$1; sub(".*/", "", mask); if( int(mask)>=best ) { best=int(mask); best_ln=$0; } } END{print best_ln}')
|
|
else
|
|
- set -- $(ip -o -f $family route list match $match $scope table "${OCF_RESKEY_table:=main}" | awk 'BEGIN{best=0} /\// { mask=$1; sub(".*/", "", mask); if( int(mask)>=best ) { best=int(mask); best_ln=$0; } } END{print best_ln}')
|
|
+ set -- $(ip -o -f $family route list match $match $scope | awk 'BEGIN{best=0} /\// { mask=$1; sub(".*/", "", mask); if( int(mask)>=best ) { best=int(mask); best_ln=$0; } } END{print best_ln}')
|
|
fi
|
|
if [ $# = 0 ] ; then
|
|
case $OCF_RESKEY_ip in
|