Browse Source

watchcat: fix broken ping invocation for no-address-family configuration

Fix for issue #19010

Signed-off-by: John Kohl <jtk.git@bostonpog.org>
Signed-off-by: Michal Kowalski <18610805+kofec@users.noreply.github.com>
(cherry picked from commit 406adc5363)
lilik-openwrt-22.03
Michal Kowalski 2 years ago
committed by Florian Eckert
parent
commit
81601471e0
2 changed files with 5 additions and 5 deletions
  1. +1
    -1
      utils/watchcat/Makefile
  2. +4
    -4
      utils/watchcat/files/watchcat.sh

+ 1
- 1
utils/watchcat/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=watchcat PKG_NAME:=watchcat
PKG_VERSION:=1 PKG_VERSION:=1
PKG_RELEASE:=16
PKG_RELEASE:=17
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com> PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
PKG_LICENSE:=GPL-2.0 PKG_LICENSE:=GPL-2.0


+ 4
- 4
utils/watchcat/files/watchcat.sh View File

@ -137,12 +137,12 @@ watchcat_monitor_network() {
for host in $ping_hosts; do for host in $ping_hosts; do
if [ "$iface" != "" ]; then if [ "$iface" != "" ]; then
ping_result="$( 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 $? echo $?
)" )"
else else
ping_result="$( 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 $? echo $?
)" )"
fi fi
@ -218,12 +218,12 @@ watchcat_ping() {
for host in $ping_hosts; do for host in $ping_hosts; do
if [ "$iface" != "" ]; then if [ "$iface" != "" ]; then
ping_result="$( 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 $? echo $?
)" )"
else else
ping_result="$( 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 $? echo $?
)" )"
fi fi


Loading…
Cancel
Save