Closed cocarrig closed 6 months ago
potential redesign methodology using netcat: nc -vz google.com 443
command success criteria: 'succeeded' is present in response
After some initial research, nc
appears to never exit when there's a failed connection, and while we can specify the length of timeouts, there is no way to specify the number of retries!
However, there is a CLI unix utility called timeout
that can kill a process after X amount of time. I've tested this and it works nicely! The exit status can be used to determine the success of the operation. If it is 0
, then it was a successful test, anything else, and it is a connection failure.
Completed and released in version 4.01 for RPi models, will not be supported for OPi models at this time: https://github.com/dakboard/Hardware-OS/releases/tag/4.01
Description: For network validation, the DAKboard OS completes a ping request to validate internet access. Because some organizations block outbound ping requests there is a use case for the ability for the users with terminal access to change the destination ping address in one location as opposed to the current hardcoded multiple locations.