# Add pypcilib and pyplnet
extra_libs=`mktemp -d "/tmp/.bootmanager.XXXXXX"`
mkdir $extra_libs/source
-cp -p $(rpm -ql pypcilib pyplnet | grep -v '\.py[co]$') $extra_libs/source
+cp -p $(rpm -ql pypcilib pyplnet monitor-runlevelagent | grep -v '\.py[co]$') $extra_libs/source
# Embed the uuencoded tarball in the script
tar -cj -C $srcdir source/ -C $extra_libs source/ | uuencode -m - >> $DEST_SCRIPT
InitializeBootManager.Run( self.VARS, self.LOG )
ReadNodeConfiguration.Run( self.VARS, self.LOG )
AuthenticateWithPLC.Run( self.VARS, self.LOG )
+ StartRunlevelAgent.Run( self.VARS, self.LOG )
GetAndUpdateNodeDetails.Run( self.VARS, self.LOG )
# override machine's current state from the command line
--- /dev/null
+#!/usr/bin/python
+
+# Copyright (c) 2003 Intel Corporation
+# All rights reserved.
+#
+# Copyright (c) 2004-2006 The Trustees of Princeton University
+# All rights reserved.
+
+
+import os
+
+from Exceptions import *
+import BootAPI
+
+
+def Run( vars, log ):
+ """
+ Start the RunlevelAgent.py script. Should follow
+ AuthenticateWithPLC() in order to guarantee that
+ /etc/planetlab/session is present.
+ """
+
+ log.write( "\n\nStep: Starting RunlevelAgent.py\n" )
+
+ try:
+ cmd = "%s/monitor-runlevelagent" % vars['BM_SOURCE_DIR']
+ # raise error if script is not present.
+ os.stat(cmd)
+ # init script only starts RLA once.
+ os.system("/bin/sh %s start bootmanager" % cmd)
+ except KeyError, var:
+ raise BootManagerException, "Missing variable in vars: %s\n" % var
+ except ValueError, var:
+ raise BootManagerException, "Variable in vars, shouldn't be: %s\n" % var
+
+ return 1
+
+