Closed Rayman closed 4 years ago
This is quite easy to test, just run rosrun robot_upstart getifip eth0
in a container:
Without fix melodic-devel (empty output)
rosrun robot_upstart getifip eth0
With fix
rosrun robot_upstart getifip eth0
172.17.0.3
Heh, kind of goofy to be depending on perl, but as long as apt is implemented in perl, it will always be there on a Debian machine. Thanks for this!
This is a different approach than https://github.com/clearpathrobotics/robot_upstart/pull/83 to get melodic compatibility.
We still use
ifconfig
, but I've modified the regex to handle the output of both distros. I've chosen for perl to print regex group 2 easily.What do you think, is this a better approach?