def start_servo(): spin_locks() cmd_line = 'sudo modprobe floppy > /dev/null' if subprocess.call(cmd_line, shell=True) != 0: log.error('failed to load floppy driver') CWLoop().start() ServoLoop().start()
def spin_locks(): try: while not (os.path.exists("/var/lib/load-balancer-servo/ntp.lock")): time.sleep(2) log.debug('waiting on ntp setup (reboot if continued)') os.remove("/var/lib/load-balancer-servo/ntp.lock") except Exception, err: log.error('failed to spin on locks: %s' % err)
def start_servo(): if run_as_sudo('modprobe floppy') != 0: log.error('failed to load floppy driver') ServoLoop().run()
def start_servo(): spin_locks() if run_as_sudo('modprobe floppy') != 0: log.error('failed to load floppy driver') CWLoop().start() ServoLoop().start()