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
remove legacy layer, just assume 4.3 and GetInterfaces
[nodeconfig.git]
/
PlanetLabConf
/
ntp.conf.php
diff --git
a/PlanetLabConf/ntp.conf.php
b/PlanetLabConf/ntp.conf.php
index
ea3ce63
..
616d8a7
100755
(executable)
--- a/
PlanetLabConf/ntp.conf.php
+++ b/
PlanetLabConf/ntp.conf.php
@@
-18,7
+18,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']));
$interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
+
if (!empty($interfaces)) {
$nodes = $adm->GetNodes(array($interfaces[0]['node_id']));
if (!empty($nodes)) {
if (!empty($interfaces)) {
$nodes = $adm->GetNodes(array($interfaces[0]['node_id']));
if (!empty($nodes)) {
@@
-42,6
+44,10
@@
if (!empty($sites)) {
$site_name= $sites[0]['name'];
$mylat= $sites[0]['latitude'];
$mylong= $sites[0]['longitude'];
$site_name= $sites[0]['name'];
$mylat= $sites[0]['latitude'];
$mylong= $sites[0]['longitude'];
+} else {
+ $site_name= "Unknown";
+ $mylat= 0;
+ $mylong= 0;
}
/* typical NTP settings */
}
/* typical NTP settings */