Beispiel #1
0
    def stopPPPD(self, dev):
        """ Stop the connection and hangup the modem """

        try:
            f = open("/var/lock/LCK.." + dev, "r")
            pid = atoi(f.readline())
            f.close()
        except:
            return "Could not open lockfile"

        try:
            os.kill(pid, SIGTERM)
        except OSError:
            return "Could not stop the process"

        return "Killed"
Beispiel #2
0
    def stopPPPD(self, dev):
        """ Stop the connection and hangup the modem """

        try:
            f = open("/var/lock/LCK.." + dev, "r")
            pid = atoi(f.readline())
            f.close()
        except:
            return "Could not open lockfile"

        try:
            os.kill(pid, SIGTERM)
        except OSError:
            return "Could not stop the process"

        return "Killed"
Beispiel #3
0
    def stopPPPD(self, dev):
        """ Stop the connection and hangup the modem """

        try:
            f = open("/var/lock/LCK.." + dev, "r")
            pid = atoi(f.readline())
            f.close()
        except:
            return _(MSG_ERR_OPENLCKF)

        try:
            os.kill(pid, SIGTERM)
        except OSError:
            return _(MSG_ERR_STOPPRCS)

        return _(MSG_KILD)
Beispiel #4
0
    def stopPPPD(self, dev):
        """ Stop the connection and hangup the modem """

        try:
            f = open("/var/lock/LCK.." + dev, "r")
            pid = atoi(f.readline())
            f.close()
        except:
            return _(MSG_ERR_OPENLCKF)

        try:
            os.kill(pid, SIGTERM)
        except OSError:
            return _(MSG_ERR_STOPPRCS)

        return _(MSG_KILD)