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
svn keywords, and url in specfile
[nodeconfig.git]
/
PlanetLabConf
/
ntp.conf.php
diff --git
a/PlanetLabConf/ntp.conf.php
b/PlanetLabConf/ntp.conf.php
index
ea3ce63
..
586e27b
100755
(executable)
--- a/
PlanetLabConf/ntp.conf.php
+++ b/
PlanetLabConf/ntp.conf.php
@@
-5,8
+5,6
@@
// Marc Fiuczynski <mef@cs.princeton.edu>
// Copyright (C) 2006 The Trustees of Princeton University
//
// Marc Fiuczynski <mef@cs.princeton.edu>
// Copyright (C) 2006 The Trustees of Princeton University
//
-// $Id$
-//
// Get admin API handle
require_once 'plc_api.php';
// Get admin API handle
require_once 'plc_api.php';
@@
-18,7
+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']));
$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
+42,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 */