From 81601471e078995e8486917e6a37113fbd65a66b Mon Sep 17 00:00:00 2001 From: Michal Kowalski <18610805+kofec@users.noreply.github.com> Date: Mon, 1 Aug 2022 20:29:07 -0400 Subject: [PATCH] watchcat: fix broken ping invocation for no-address-family configuration Fix for issue #19010 Signed-off-by: John Kohl Signed-off-by: Michal Kowalski <18610805+kofec@users.noreply.github.com> (cherry picked from commit 406adc536325d955cbccfacb2a2986ea6643ff0b) --- utils/watchcat/Makefile | 2 +- utils/watchcat/files/watchcat.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/watchcat/Makefile b/utils/watchcat/Makefile index 8bdf864a4..8140edfe0 100644 --- a/utils/watchcat/Makefile +++ b/utils/watchcat/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=watchcat PKG_VERSION:=1 -PKG_RELEASE:=16 +PKG_RELEASE:=17 PKG_MAINTAINER:=Roger D PKG_LICENSE:=GPL-2.0 diff --git a/utils/watchcat/files/watchcat.sh b/utils/watchcat/files/watchcat.sh index dd0e9b27f..0f300a4a4 100644 --- a/utils/watchcat/files/watchcat.sh +++ b/utils/watchcat/files/watchcat.sh @@ -137,12 +137,12 @@ watchcat_monitor_network() { for host in $ping_hosts; do if [ "$iface" != "" ]; then ping_result="$( - ping "$ping_family" -I "$iface" -s "$ping_size" -c 1 "$host" &> /dev/null + ping $ping_family -I "$iface" -s "$ping_size" -c 1 "$host" &> /dev/null echo $? )" else ping_result="$( - ping "$ping_family" -s "$ping_size" -c 1 "$host" &> /dev/null + ping $ping_family -s "$ping_size" -c 1 "$host" &> /dev/null echo $? )" fi @@ -218,12 +218,12 @@ watchcat_ping() { for host in $ping_hosts; do if [ "$iface" != "" ]; then ping_result="$( - ping "$ping_family" -I "$iface" -s "$ping_size" -c 1 "$host" &> /dev/null + ping $ping_family -I "$iface" -s "$ping_size" -c 1 "$host" &> /dev/null echo $? )" else ping_result="$( - ping "$ping_family" -s "$ping_size" -c 1 "$host" &> /dev/null + ping $ping_family -s "$ping_size" -c 1 "$host" &> /dev/null echo $? )" fi