예제 #1
0
    def __init__(self, d):
        # d = dialog object
        logging.debugv("menu/manage.py->__init__(self, d)", [])
        self.d = d

        # c = config object
        self.c = config.Config()
예제 #2
0
    def __init__(self):
        #self.d = dialog.Dialog(dialog="/usr/bin/Xdialog", compat="Xdialog")
        #self.d = dialog.Dialog(dialog="/usr/bin/zenity", compat="")
        logging.debugv("menu/__init__.py->__init__(self)", [])
        self.d = dialog.Dialog()

        self.d.setBackgroundTitle('SURFids sensor v3.0 running on ' + functions.system())

        # c = config object
        self.c = c.Config()
예제 #3
0
    def __init__(self, d):
        # d = dialog object
        self.d = d

        # c = config object        self.c = config.Config()
        self.c = config.Config()

        # flag for config change. used for "activate new config" popup
        self.changed = False

        logging.debugv("menu/config.py->__init__(self, d)", [])
예제 #4
0
    def __init__(self):
        logging.debugv("manager.py->__init__(self)", [])

        os.putenv('LANG', 'en_US.UTF-8')
        os.environ['LANG'] = 'en_US.UTF-8'

        self.c = config.Config()
        self.d = dialog.Dialog()

        if not f.managerStatus():
            logging.debug("No manager running, cleaning up, writing PID")
            f.cleanUp()
            f.writePID()

        f.suppressDmesg()

        if not f.checkRoot():
            logging.error("Not root, you should run the manager as root")
            sys.exit(1)
예제 #5
0
 def __init__(self, d):
     logging.debugv("menu/status.py->__init__(self, d)", [])
     self.d = d
     self.c = config.Config()
예제 #6
0
    def __init__(self, d):
        logging.debugv("menu/about.py->__init__(self, d)", [])
        self.d = d

        # c = config object
        self.c = config.Config()
예제 #7
0
import platform
import urllib2
import os
import time
import configobj

from sensor import config
from sensor import client
from sensor import tools
from sensor import version
from sensor import locations
from sensor import dialog
from sensor import log

# configuration object
c = config.Config()

system = platform.system()

# import system specific functions
if system == 'Linux':
    from linux import *
elif system == 'OpenBSD':
    from openbsd import *
else:
    logging.error("unsupported system: " + system)
    import sys
    sys.exit(1)

def getVer(file):
    """ Get the version (changelog) of the given file """