2008-05-14 16:43:41 +00:00
|
|
|
#!/bin/sh
|
2007-10-26 22:44:33 +00:00
|
|
|
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
#
|
2008-05-14 16:43:41 +00:00
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
# setup NTP configuration on the compute nodes
|
|
|
|
#
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
master=$MASTER
|
|
|
|
conf_file="/etc/ntp.conf"
|
|
|
|
conf_file_backup="/etc/ntp.conf.postbackup"
|
|
|
|
# if backup does not exist, backup
|
|
|
|
if [ ! -f $conf_file_backup ]; then
|
|
|
|
mv -f $conf_file $conf_file_backup
|
2007-10-26 22:44:33 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
logger -t xcat "Install: Setup NTP"
|
|
|
|
|
2008-05-14 16:43:41 +00:00
|
|
|
echo "server $master" >$conf_file
|
2007-10-26 22:44:33 +00:00
|
|
|
|
|
|
|
mkdir -p /etc/ntp
|
|
|
|
chown ntp /etc/ntp
|
|
|
|
|
2008-05-26 20:39:13 +00:00
|
|
|
echo "driftfile /var/lib/ntp/drift
|
|
|
|
restrict 127.0.0.1
|
|
|
|
authenticate no" >>$conf_file
|
2008-05-27 13:33:14 +00:00
|
|
|
|
|
|
|
service ntpd stop
|
|
|
|
ntpdate $master
|
|
|
|
service ntpd start
|