- other_pid = tools.pid_file()
- if other_pid != None:
- 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)
- return
+ # Load and start modules
+ for module in ['net', 'proper', 'conf_files', 'sm', 'bwmon']:
+ try:
+ m = __import__(module)
+ m.start(options, config)
+ modules.append(m)
+ except ImportError, err:
+ print "Warning while loading module %s:" % module, err
+
+ # Load /etc/planetlab/session
+ if os.path.exists(options.session):
+ session = file(options.session).read().strip()
+ else:
+ session = options.session
+
+ # Initialize XML-RPC client
+ plc = PLCAPI(config.plc_api_uri, config.cacert, session, timeout=options.period/2)