def _nuke_system_device(self, devname):
        # NOTE: Taking the device down does not cause PPP or L2TP termination
        # in any reasonable time.  However: (1) user traffic is stopped by this,
        # and (2) this device doesn't count toward licenses anyway.  If the user
        # disconnects the connection, the device will go away normally.
        #
        # We could attempt to kill the pppd by looking at ps axwuf|grep pppd;
        # the device name is on the command line, yielding the pid.  This
        # seems too unreliable, though.  We could also attempt to kill the
        # openl2tp session by looking at the device name, and deducing the
        # tunnel and session IDs; openl2tp tunnels and sessions can then be
        # identified using these.
        #
        # This may not be robust with respect to pppox and pppol2tp kernel
        # modules.

        from codebay.l2tpserver import pppscripts
        pppscripts.nuke_ppp_device(devname)
Exemple #2
0
    def _nuke_system_device(self, devname):
        # NOTE: Taking the device down does not cause PPP or L2TP termination
        # in any reasonable time.  However: (1) user traffic is stopped by this,
        # and (2) this device doesn't count toward licenses anyway.  If the user
        # disconnects the connection, the device will go away normally.
        #
        # We could attempt to kill the pppd by looking at ps axwuf|grep pppd;
        # the device name is on the command line, yielding the pid.  This
        # seems too unreliable, though.  We could also attempt to kill the
        # openl2tp session by looking at the device name, and deducing the
        # tunnel and session IDs; openl2tp tunnels and sessions can then be
        # identified using these.
        #
        # This may not be robust with respect to pppox and pppol2tp kernel
        # modules.

        from codebay.l2tpserver import pppscripts
        pppscripts.nuke_ppp_device(devname)
 def _nuke_rdf_device(self, devnode):
     from codebay.l2tpserver import pppscripts
     devname = devnode.getS(ns.deviceName, rdf.String)
     pppscripts.nuke_ppp_device(devname)
Exemple #4
0
 def _nuke_rdf_device(self, devnode):
     from codebay.l2tpserver import pppscripts
     devname = devnode.getS(ns.deviceName, rdf.String)
     pppscripts.nuke_ppp_device(devname)