Ejemplo n.º 1
0
def stophal_ledctrl():
    if STARTMODULE.get('hal_ledctrl', 0) == 1:
        rets = get_pid("hal_ledctrl.py")
        for ret in rets:
            cmd = "kill " + ret
            os.system(cmd)
        return True
Ejemplo n.º 2
0
def stop_slot_monitor():
    u'''disable slot timer service'''
    if STARTMODULE.get('slot_monitor', 0) == 1:
        rets = get_pid("slot_monitor.py")  #
        for ret in rets:
            cmd = "kill " + ret
            os.system(cmd)
        return True
Ejemplo n.º 3
0
def load_driver():
    u'''load devices and drivers'''
    adddrivers()
    adddevs()
    if STARTMODULE.get("i2ccheck",0) == 1: #i2c HA
        busend = i2ccheck_params.get("busend")
        retrytime = i2ccheck_params.get("retrytime")
        i2c_check(busend,retrytime)
    start_fan_ctrl() # enable fan
    starthal_fanctrl() # enable fan control
    starthal_ledctrl() # enable LED control
    if STARTMODULE['avscontrol'] == 1:
        start_avs_ctrl() # avs voltage-adjustment
    start_dev_monitor() # enable removable device driver monitors
    start_slot_monitor() # slot insertion and removal initialization monitor
    otherinit();    # other initialization, QSFP initialization
    if STARTMODULE.get("macledreset", 0) == 1:
        set_mac_leds("reset")
Ejemplo n.º 4
0
def starthal_ledctrl():
    if STARTMODULE.get('hal_ledctrl', 0) == 1:
        cmd = "nohup hal_ledctrl.py start >/dev/null 2>&1 &"
        rets = get_pid("hal_ledctrl.py")
        if len(rets) == 0:
            os.system(cmd)
Ejemplo n.º 5
0
def start_slot_monitor():
    if STARTMODULE.get('slot_monitor', 0) == 1:
        cmd = "nohup slot_monitor.py start >/dev/null 2>&1 &"
        rets = get_pid("slot_monitor.py")
        if len(rets) == 0:
            os.system(cmd)