Merge pull request #19084 from jtkohl/watchcat-ping-bugfix
watchcat: fix broken ping invocation for no-address-family configuration
This commit is contained in:
commit
437f7a54ff
2 changed files with 5 additions and 5 deletions
|
@ -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
|
||||||
|
|
|
@ -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…
Reference in a new issue