On 4/14/11 4:11 AM, Roberto Riggio wrote:
> Il 14/04/2011 12:03, Jo-Philipp Wich ha scritto:
>> I'd suggest to use "ip route list exact 0.0.0.0/0" to find the device
>> and then the find_config() shell function to map the device to an uci
>> interface name.
> Thanks very much for the quick answer. I did not know about the
> find_config() function. However I will rely on the route command
> since ip is not installed by default.
> 
> BTW wouldn't be time to switch to ip? :)

Yes, definitely.

Parsing output from "ifconfig xxx" is a lot more challenging than parsing:

ip -o link show xxx

for instance...  or:

ip -o -0 addr show xxx

-Philip
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to