I'd use 'ip route list' to identify the current default router. 
It will say someting like 

>ip route list
>default via 192.168.1.1 dev eth0
> ...

and I'd use perl to parse the results, but that's up to you :)
ip is a replacement for all the other network config tools which are
concidered obsolete.


------------------------------------------------------------------------
richardsk's Profile: http://forums.slimdevices.com/member.php?userid=1350
View this thread: http://forums.slimdevices.com/showthread.php?t=95037

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to