1
0
mirror of https://github.com/gryf/wicd.git synced 2026-01-09 23:34:17 +01:00

All branches/trunk:

- Specify the device to use in SetDefaultRoute
This commit is contained in:
imdano
2008-08-29 12:22:34 +00:00
parent e13f83d9fc
commit 5a20b38e79

View File

@@ -548,10 +548,11 @@ class Interface(object):
gw -- gateway of the default route in dotted quad form
"""
if not self.iface: return
if not misc.IsValidIP(gw):
print 'WARNING: Invalid gateway found. Aborting!'
return False
cmd = 'route add default gw ' + gw
cmd = 'route add default gw %s dev %s' % (gw, self.iface)
if self.verbose: print cmd
misc.Run(cmd)