git://git.onelab.eu
/
nodeconfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use GET['node_id'] to figure the node instead of from the incoming IP - thanks Thomas
[nodeconfig.git]
/
PlanetLabConf
/
ntp.conf.php
diff --git
a/PlanetLabConf/ntp.conf.php
b/PlanetLabConf/ntp.conf.php
index
586e27b
..
4945fb0
100755
(executable)
--- 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
$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)) {
}
if (!isset($node)) {
@@
-31,6
+26,7
@@
if (!isset($node)) {
exit();
}
exit();
}
+
$problem_models = array("Dell Precision 340", "Unknown");
$hostname= trim($node['hostname']);
$problem_models = array("Dell Precision 340", "Unknown");
$hostname= trim($node['hostname']);