diff --git a/agent b/agent index b713b7b..1ab1499 100755 --- a/agent +++ b/agent @@ -333,9 +333,11 @@ class NodeAgent iface = $2 end result = _get_all_interfaces_info - result[:default_gateway] = gw - result[:default_interface] = iface - result[:mac] = @facter["macaddress_#{iface.gsub('-', '_')}"].upcase + if gw and iface + result[:default_gateway] = gw + result[:default_interface] = iface + result[:mac] = @facter["macaddress_#{iface.gsub('-', '_')}"].upcase + end result end