apc-p15-tool/pkg/apcssh
Greg T. Wallace 703c26bd27 apcssh: add shell cmd timeout
It was possible for scanner.Scan() to block indefinitely if the UPS never returned the expected prompt regex pattern. This could occur with a UPS using a prompt format I'm not aware of, or if the UPS responds in a non-standard way.

This change ensures that Scan() is aborted after a fixed amount of blocking time and the shell cmd function accordingly returns an error.

Some error messages, comments, and var names are also updated for clarity.
2024-06-19 19:56:17 -04:00
..
client.go apcssh: remove logging 2024-06-06 22:52:54 -04:00
cmd_restartwebui.go apcssh: minor log and logic clarity 2024-06-19 19:56:16 -04:00
scp.go apcssh: minor log and logic clarity 2024-06-19 19:56:16 -04:00
shell.go apcssh: add shell cmd timeout 2024-06-19 19:56:17 -04:00
shell_helpers.go apcssh: add shell cmd timeout 2024-06-19 19:56:17 -04:00
ssl.go apcssh: minor log and logic clarity 2024-06-19 19:56:16 -04:00