The Network Wizard in many pups is very old code.
rerwin has worked on it; however, it is still very old.
It has a translation system that is not good, I have replaced with gettext. That seems to be working.
The code makes extensive use of 'ifconfig' and 'iwconfig', both deprecated.
In fact, 'wireless-tools', that has iwconfig, is no longer in the repository of some distributions.
ipconfig can be replaced by 'ip'. "ifconfig -a" can be replaced:
Code: Select all
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether a4:ae:11:16:23:58 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 00:0f:53:b0:17:2e brd ff:ff:ff:ff:ff:ff
inet 192.168.43.115/24 brd 192.168.43.255 scope global dynamic noprefixroute wlan0
valid_lft 1607sec preferred_lft 949sec
4: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 28:7f:cf:eb:43:66 brd ff:ff:ff:ff:ff:ff
inet 192.168.43.204/24 brd 192.168.43.255 scope global dynamic noprefixroute wlan1
valid_lft 2327sec preferred_lft 1877sec
inet6 fe80::2a7f:cfff:feeb:4376/64 scope link
valid_lft forever preferred_lft forever
No problemo, I can parse that. However, the ip man page states the the "-o" or "-oneline" option will output on one line, to make parsing with grep easier:
Code: Select all
# ip -o a
1: lo inet 127.0.0.1/8 scope host lo\ valid_lft forever preferred_lft forever
1: lo inet6 ::1/128 scope host \ valid_lft forever preferred_lft forever
3: wlan0 inet 192.168.43.115/24 brd 192.168.43.255 scope global dynamic noprefixroute wlan0\ valid_lft 908sec preferred_lft 250sec
4: wlan1 inet 192.168.43.204/24 brd 192.168.43.255 scope global dynamic noprefixroute wlan1\ valid_lft 3428sec preferred_lft 2853sec
4: wlan1 inet6 fe80::2a7f:cfff:feeb:4376/64 scope link \ valid_lft forever preferred_lft forever
...huh??? that doesn't make any sense. What happened to eth0?
Do I have a buggy 'ip'?
Code: Select all
# ip -V
ip utility, iproute2-5.17.0