5 The purpose is to provide a mechanism for deploying source fixes
6 faster than, or instead of, waiting for rpm updates.
8 The machanism is via tar files copied from PlanetLabConf/hotfixes/* to
9 the root filesystem of machines in a given nodegroup.
12 Nodes call this script via ConfFiles; the tar file for the first
13 matching nodegroup is returned to the node.
16 require_once 'plc_api.php';
18 if ( isset($_REQUEST['debug']) ) {
31 logit("nodeid check");
34 if ( isset($_REQUEST['node_id']) ) {
36 $nodes = $adm->GetNodes(array(intval($_REQUEST['node_id'])));
42 if ( count($node['nodegroup_ids']) > 0 )
44 // collect a list of all nodegroup names for this node.
45 foreach ( $node['nodegroup_ids'] as $ng_id ) {
46 $ngs = $adm->GetNodeGroups(array('nodegroup_id' => $ng_id));
48 logit($ngs[0]['groupname']);
49 $ng_names[] = $ngs[0]['groupname'];
53 $ng_names[] = "default";
57 foreach ( $ng_names as $name )
59 logit("name: " . $name);
60 // check that directory exists
61 $file= "hotfixes/$name.tar";
67 // stop after the first match.