Closed Rayman closed 4 years ago
Thanks you for the review. I've addressed all comments.
This patch only seems to work on melodic because iproute2
should support the -json option. Can you make a melodic-devel branch then I'll retarget my PR.
I'm not over the moon about needing a distro branch in this repo, just for this change. Would it be possible to support both? Like, perhaps by testing for ip addr
supporting the -json
flag, and if not, falling back on the other ifconfig
invocation?
For the purposes of the fallback, I'd be fine if you just wanted to shell out to a bash -c
rather than re-implementing the pipes using a bunch of tortured subprocess stuff.
I've done another try with this PR: https://github.com/clearpathrobotics/robot_upstart/pull/88. This keeps a single branch for all distros.
ifconfig is deprecated in favor of iproute2. So I rewrote the script to parse the json output of the
ip route addr show <INTERFACE>
command.This should also work for lower versions of ubuntu, but I did not test those.