search for: default_gateway

Displaying 1 result from an estimated 1 matches for "default_gateway".

2007 Apr 26
2
[PATCH] facter: add interfaces, default_gateway facts on Linux
...} end end + Facter.add(:interfaces) do + confine :kernel => :linux + setcode do + %x{/sbin/ifconfig -a -s}.split($/)[1..-1].collect {|line| line.split}.collect {|line| line.first} + end + end + Facter.add(:default_gateway) do + confine :kernel => :linux + setcode do + %x{/bin/netstat -rn}.split($/)[1..-1].collect {|line| line.split}.select {|line| line[0] == ''0.0.0.0''}.collect {|line| line[1]} + end + end Facter.add(:iphostnumber) d...