Closed dimon222 closed 7 years ago
@dimon222 I tried many ways to find the ip addresses and route was the most correct. You could check with a regex or so if the output of f8 is an ip and if not retry with f6?
f6 does indeed pop the IP Address on OpenVZ.
@dimon222 @a2mj Feel free to make a PR to detect and fix this.
f6
didn't work for me...
I'm user of VPS under OpenVZ. Not sure if its related to specific virtualization options, but the route is not returning "via" part. Basically it causes offset for awk arguments, so the f8 is empty string.
What it usually returns (excluding cache part): 192.168.0.1 via x.x.x.x dev interface0 src y.y.y.y
What it returns for my OpenVZ container: 192.168.0.1 dev interface0 src y.y.y.y
So the result is f6 instead of f8.