Skip to content

Commit ac0e330

Browse files
committed
watchcat: passing the interface in the ping_reboot
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]>
1 parent 485dee2 commit ac0e330

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

utils/watchcat/files/watchcat.init

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ config_watchcat() {
104104
;;
105105
ping_reboot)
106106
procd_open_instance "watchcat_${1}"
107-
procd_set_param command /usr/bin/watchcat.sh "ping_reboot" "$period" "$forcedelay" "$pinghosts" "$pingperiod" "$pingsize" "$addressfamily"
107+
procd_set_param command /usr/bin/watchcat.sh "ping_reboot" "$period" "$forcedelay" "$pinghosts" "$pingperiod" "$pingsize" "$addressfamily" "$interface"
108108
procd_set_param respawn "${respawn_threshold:-3600}" "${respawn_timeout:-5}" "${respawn_retry:-5}"
109109
procd_close_instance
110110
;;

utils/watchcat/files/watchcat.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ watchcat_ping() {
188188
ping_frequency_interval="$4"
189189
ping_size="$5"
190190
address_family="$6"
191+
iface="$7"
191192

192193
time_now="$(cat /proc/uptime)"
193194
time_now="${time_now%%.*}"
@@ -252,8 +253,8 @@ periodic_reboot)
252253
watchcat_periodic "$2" "$3"
253254
;;
254255
ping_reboot)
255-
# args from init script: period forcedelay pinghosts pingperiod pingsize addressfamily
256-
watchcat_ping "$2" "$3" "$4" "$5" "$6" "$7"
256+
# args from init script: period forcedelay pinghosts pingperiod pingsize addressfamily interface
257+
watchcat_ping "$2" "$3" "$4" "$5" "$6" "$7" "$8"
257258
;;
258259
restart_iface)
259260
# args from init script: period pinghosts pingperiod pingsize interface mmifacename unlockbands addressfamily

0 commit comments

Comments
 (0)