1 _add_etc_network_interfaces() {
2 echo '** Network interface configuration:' >&3
4 awk '$1 ~ /key|pass|^wpa-(anonymous|identity|phase|pin|private|psk)/ { gsub(".", "*", $2); }
5 $1 == "ethtool-wol" { gsub(".", "*", $3); }
6 !/^[[:space:]]*\#/ { print; }
7 ' </etc/network/interfaces >&3
12 yesno "Include network configuration and status from this computer? " nop
13 test $REPLY = yep || return 0
15 _add_etc_network_interfaces
16 echo '** Network status:' >&3
17 if command -v ip >/dev/null; then
18 echo '*** IP interfaces and addresses:' >&3
22 echo '*** Device statistics:' >&3
25 if command -v netstat >/dev/null; then
26 echo '*** Protocol statistics:' >&3
27 netstat -s >&3 || true
30 echo '*** Device features:' >&3
31 for dir in /sys/class/net/*; do
32 echo -n "${dir##*/}: " >&3
33 cat "$dir"/features >&3
39 test $same_system = yep || return 0
40 yesno "Include network configuration from this computer? " nop
41 test $REPLY = yep || return 0
43 _add_etc_network_interfaces