watchcat: passing the interface in the ping_reboot
authorVasileios Anagnostopoulos <[email protected]>
Wed, 26 Nov 2025 13:50:07 +0000 (14:50 +0100)
committerHannu Nyman <[email protected]>
Fri, 12 Dec 2025 15:40:40 +0000 (16:40 +0100)
Although the watchcat_ping function also checked the iface variable, that
variable was never populated. As a result we could not check if there was
connectivity via a specific interface.

Signed-off-by: Vasileios Anagnostopoulos <[email protected]>
utils/watchcat/Makefile
utils/watchcat/files/watchcat.init
utils/watchcat/files/watchcat.sh

index 8541672e8d74e0641431390f2d4980ce75007985..7b011cf036e59e1f9010040c4b59779c197de30c 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=watchcat
 PKG_VERSION:=1
-PKG_RELEASE:=18
+PKG_RELEASE:=19
 
 PKG_MAINTAINER:=Roger D <[email protected]>
 PKG_LICENSE:=GPL-2.0
index dcaa8ece5b0d25c9a976ecc5de61b357e69de84b..da1cd0e77556eb30ab0126ec0cbedbd55037f663 100644 (file)
@@ -104,7 +104,7 @@ config_watchcat() {
                ;;
        ping_reboot)
                procd_open_instance "watchcat_${1}"
-               procd_set_param command /usr/bin/watchcat.sh "ping_reboot" "$period" "$forcedelay" \"$pinghosts\" "$pingperiod" "$pingsize" "$addressfamily"
+               procd_set_param command /usr/bin/watchcat.sh "ping_reboot" "$period" "$forcedelay" \"$pinghosts\" "$pingperiod" "$pingsize" "$addressfamily" "$interface"
                procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}"
                procd_close_instance
                ;;
index 0f300a4a44157bfa1b940afa2ab1eeea385ede9e..0f4dca16e90cd5926d307e981cd121bf640ae67a 100644 (file)
@@ -188,6 +188,7 @@ watchcat_ping() {
        ping_frequency_interval="$4"
        ping_size="$5"
        address_family="$6"
+       iface="$7"
 
        time_now="$(cat /proc/uptime)"
        time_now="${time_now%%.*}"
@@ -252,8 +253,8 @@ periodic_reboot)
        watchcat_periodic "$2" "$3"
        ;;
 ping_reboot)
-       # args from init script: period forcedelay pinghosts pingperiod pingsize addressfamily
-       watchcat_ping "$2" "$3" "$4" "$5" "$6" "$7"
+       # args from init script: period forcedelay pinghosts pingperiod pingsize addressfamily interface
+       watchcat_ping "$2" "$3" "$4" "$5" "$6" "$7" "$8"
        ;;
 restart_iface)
        # args from init script: period pinghosts pingperiod pingsize interface mmifacename unlockbands addressfamily