Try to print network devices information when interface setup fails

Useful to check interfaces name and MAC address.

v0.9-1
This commit is contained in:
Julien Coloos
2021-10-24 17:56:05 +02:00
parent b3e9382f08
commit c3cafcf6cd
4 changed files with 13 additions and 3 deletions

View File

@@ -40,9 +40,12 @@ sshcs_net_start() {
echo ""
echo "Configuring IP (timeout = ${sshcs_opt_timeout_ipconfig}s) ..."
# ipconfig manual: https://git.kernel.org/pub/scm/libs/klibc/klibc.git/tree/usr/kinit/ipconfig/README.ipconfig
ipconfig_out=$(ipconfig -t "${sshcs_opt_timeout_ipconfig}" "ip=${ip}")
if [ $? -ne 0 ]; then
err "IP configuration timeout!"
echo "Devices probing:"
ipconfig -n -t 5 -c none all
return 1
fi