From 7164151d1ef862940830925fe7775527489e37e0 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 25 Sep 2013 19:00:34 +0200 Subject: [PATCH] use GET['node_id'] to figure the node instead of from the incoming IP - thanks Thomas --- PlanetLabConf/ntp.conf.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/PlanetLabConf/ntp.conf.php b/PlanetLabConf/ntp.conf.php index 586e27b..4945fb0 100755 --- a/PlanetLabConf/ntp.conf.php +++ b/PlanetLabConf/ntp.conf.php @@ -16,14 +16,9 @@ $default_name = "default"; $file_name = $config_directory . $file_prefix . $default_name; // Look up the node - -$interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR'])); - -if (!empty($interfaces)) { - $nodes = $adm->GetNodes(array($interfaces[0]['node_id'])); - if (!empty($nodes)) { - $node = $nodes[0]; - } +$nodes = $adm->GetNodes(array('node_id' => (int)$_GET['node_id'])); +if (!empty($nodes)) { + $node = $nodes[0]; } if (!isset($node)) { @@ -31,6 +26,7 @@ if (!isset($node)) { exit(); } + $problem_models = array("Dell Precision 340", "Unknown"); $hostname= trim($node['hostname']); -- 2.43.0