Logo Search packages:      
Sourcecode: wicd version File versions

def wicd::wnettools::Interface::SetDefaultRoute (   self,
  gw 
) [inherited]

Add a default route with the specified gateway.

Keyword arguments:
gw -- gateway of the default route in dotted quad form

Definition at line 517 of file wnettools.py.

00517                                  :
        """ Add a default route with the specified gateway.

        Keyword arguments:
        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 %s dev %s' % (gw, self.iface)
        if self.verbose: print cmd
        misc.Run(cmd)

    def GetIP(self):


Generated by  Doxygen 1.6.0   Back to index