From 1c247c9eb47c1b4d3ebf0c35b9a882ff11ff893d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Wir=C3=A9n?= Date: Thu, 11 Jul 2013 00:05:53 +0200 Subject: [PATCH] Updated GenericBsdIfconfigNetwork to collect gateway --- library/system/setup | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/library/system/setup b/library/system/setup index a151aa46931..4638b1dce59 100644 --- a/library/system/setup +++ b/library/system/setup @@ -1548,9 +1548,12 @@ class GenericBsdIfconfigNetwork(Network): lines = out.split('\n') for line in lines: words = line.split() - # look for first word starting interface - if len(words) > 0 and words[0] == 'interface:': - interface[v]['interface'] = words[1] + # Collect output from route command + if len(words) > 0: + if words[0] == 'interface:': + interface[v]['interface'] = words[1] + if words[0] == 'gateway:': + interface[v]['gateway'] = words[1] return interface['v4'], interface['v6']