Open marek22k opened 10 months ago
This issue has been mentioned on Meshtastic. There might be relevant details there:
https://meshtastic.discourse.group/t/meshtastic-tunnel-sh-1-ifconfig-not-found/3818/4
run: ip addr, some unix distro's require that.
Also have you installed "net-tools"
$ sudo apt-get install net-tools
ifconfig is deprecated (see above) and should no longer be used on Linux systems. Therefore ip
should be used.
Yes, installing net-tools
solves the symptoms, but not the actual problem.
Looking at the code in tunnel.py
it looks like its using the pytap2 library here https://github.com/meshtastic/python/blob/master/meshtastic/tunnel.py#L23
ifconfig from the pytap2 library is used here: https://github.com/meshtastic/python/blob/master/meshtastic/tunnel.py#L115
Looking at the pytap2 homepage it states a dependency on net-tools
https://github.com/johnthagen/pytap2
I believe this third party dependency for net-tools
should probably be included in the Meshtastic documentation.
could also raise this deprecation of ifconfig with the pytap2 library maintainers and get this fixed upstream
However looking at this comment it looks like they are well aware of this deprecation: https://github.com/johnthagen/pytap2/blob/master/src/pytap2/__init__.py#L162
# TODO: New systems like Ubuntu 17.04 do not come with ifconfig pre-installed.
ifconfig_cmd = "ifconfig {} ".format(self._name)
Issue raised with upstream pytap2 maintainers https://github.com/johnthagen/pytap2/issues/15
Is this still out of date?
Yes, it is legacy on Linux (i.e. not BSD).
Just bumped the PR/issue I made on the pytap2 repo to make iproute2 the default instead of ifconfig
Hello,
ifconfig is obsolete on Linux and should be replaced by ip. On some Linux distributions, ifconfig is no longer (pre)installed.