TSW202 Ping Reboot service doesn't work

I was testing some things related to this ticket and thought I’d try using the ping reboot service.

Turns out the ping reboot service always fails (firmware 1.0.6):

Fri Jun 20 10:26:04 2025 user.notice ping_reboot.sh: Ping 8.8.8.8 failed.
Fri Jun 20 10:26:04 2025 user.notice ping_reboot.sh: Ping 1.1.1.1 failed.

even though pinging those ips works fine:

root@TSW202:/etc/opkg# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=115 time=21.460 ms
64 bytes from 8.8.8.8: seq=1 ttl=115 time=20.806 ms

...

root@TSW202:/etc/opkg# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: seq=0 ttl=52 time=25.160 ms
64 bytes from 1.1.1.1: seq=1 ttl=52 time=24.888 ms

To debug, I found the cron job that performs the ping tests:

root@TSW202:/etc/opkg# crontab -u preboot -l
*/5 * * * * /usr/sbin/ping_reboot.sh cfg01c21d

and running this script as root works just fine (even though there’s some error output):

root@TSW202:/etc/opkg# /usr/sbin/ping_reboot.sh cfg01c21d
WARNING: Variable 'modems' does not exist or is not an array/object
Command failed: Not found
Failed to parse message data
Command failed: Not found

...

Fri Jun 20 10:33:13 2025 user.notice ping_reboot.sh: Ping 8.8.8.8 successful.
Fri Jun 20 10:33:13 2025 user.notice ping_reboot.sh: Ping 1.1.1.1 successful.
Fri Jun 20 10:33:13 2025 user.notice ping_reboot.sh: Pings successful.

However, for completness I installed sudo so I could run the script as ‘preboot’, and see the failures:

root@TSW202:/etc/opkg# sudo -u preboot /usr/sbin/ping_reboot.sh cfg01c21d
WARNING: Variable 'modems' does not exist or is not an array/object
Command failed: Not found
Failed to parse message data
/sbin/uci: I/O error
Command failed: Not found

...

Fri Jun 20 10:35:01 2025 user.notice ping_reboot.sh: Ping 8.8.8.8 failed.
Fri Jun 20 10:35:01 2025 user.notice ping_reboot.sh: Ping 1.1.1.1 failed.
Fri Jun 20 10:35:01 2025 user.notice ping_reboot.sh: 2 unsuccessful ping tries

and further debugging reveals that the ‘preboot’ user does not have permission to ping:

root@TSW202:/etc/opkg# sudo -u preboot /bin/ping -W 5 -s 56 -q -c 1 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
ping: permission denied (are you root?)

Hi there,

As this is a separate issue from the one we’re already in progress with, I’d like to ask you to fill out the new form I’ve sent you so we can separate the two easier. The ID will be 14312.

I’ll probably have to make this into a case for the R&D team, so the troubleshoot file would be highly appreciated. Of course, only send it once we start our communication via e-mails.

Thank you,
M.

Hello,

The planned fix for this issue will be released with the 1.7 firmware version of the TswOS.

Regards,
M.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.