Affects Version/s: None
Fix Version/s: 3.9.0
Could you please discover the default gateway on the system and provide it as a system variable?
This would be useful for inventory and also my client wants to record the default route in /etc/sysconfig/network to simplify life for their operators (right now their VMs and physical servers get the default route in different files because provisioning is different).
On IRC, Ted pointed out this information is available in /proc/net/route on systems that have procfs.
Neil said don't forget about IPv6.
This is how I'm getting this data now:
string => execresult("/sbin/ip -4 route list 0/0", noshell);
slist => splitstring( $(ip_route_output), " ", 3);
string => nth( "split_ip_route_output", 2 );