Merge pull request #3497 from johanwiren/bsd-gateway

Updated setup module to collect gateway fact for BSD systems
reviewable/pr18780/r1
Michael DeHaan 12 years ago
commit 38ac6c9abd

@ -1548,9 +1548,12 @@ class GenericBsdIfconfigNetwork(Network):
lines = out.split('\n') lines = out.split('\n')
for line in lines: for line in lines:
words = line.split() words = line.split()
# look for first word starting interface # Collect output from route command
if len(words) > 0 and words[0] == 'interface:': if len(words) > 0:
interface[v]['interface'] = words[1] if words[0] == 'interface:':
interface[v]['interface'] = words[1]
if words[0] == 'gateway:':
interface[v]['gateway'] = words[1]
return interface['v4'], interface['v6'] return interface['v4'], interface['v6']

Loading…
Cancel
Save