13 parser = optparse.OptionParser()
14 parser.add_option('-d', '--daemon', action='store_true', dest='daemon', default=False, help='run daemonized')
15 parser.add_option('-s', '--startup', action='store_true', dest='startup', default=False, help='run all sliver startup scripts')
16 (options, args) = parser.parse_args()
18 # XXX - awaiting a real implementation
23 for mod in modules: mod.GetSlivers_callback(data)
25 def start_and_register_callback(mod):
32 if options.daemon: tools.daemon()
35 other_pid = tools.pid_file()
37 print """There might be another instance of the node manager running as pid %d. If this is not the case, please remove the pid file %s""" % (other_pid, tools.PID_FILE)
40 start_and_register_callback(sm)
41 start_and_register_callback(conf_files)
44 except: logger.log_exc()
46 except: logger.log_exc()
49 if __name__ == '__main__': run()
51 # This is for debugging purposes. Open a copy of Python and import nm
52 tools.as_daemon_thread(run)