From 77bf35aff6ddbad166bb16e351eaabcf21ac390d Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 15 May 2008 18:24:47 +0000 Subject: [PATCH] add restrict 127.0.0.1 and fix missing server attribute git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1416 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/NTPsn.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-server-2.0/lib/xcat/plugins/NTPsn.pm b/xCAT-server-2.0/lib/xcat/plugins/NTPsn.pm index 0e73c1f41..75a7aa1b7 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/NTPsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/NTPsn.pm @@ -119,9 +119,11 @@ sub setup_NTPsn open(CFGFILE, ">$ntpcfg") or xCAT::MsgUtils->message('SE', "Cannot open $configfile for NTP update. \n"); + print CFGFILE "server "; print CFGFILE $master; print CFGFILE "\n"; print CFGFILE "driftfile /var/lib/ntp/drift\n"; + print CFGFILE "restrict 127.0.0.1\n"; close CFGFILE; $rc = &start_NTP(); # restart ntp @@ -165,6 +167,7 @@ sub setup_NTPmn print CFGFILE "\n"; } print CFGFILE "driftfile /var/lib/ntp/drift\n"; + print CFGFILE "restrict 127.0.0.1\n"; close CFGFILE; $rc = &start_NTP(); # restart ntp