b427092c6c
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1493 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
30 lines
733 B
Bash
Executable File
30 lines
733 B
Bash
Executable File
#!/bin/sh
|
|
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
|
#
|
|
#---------------------------------------------------------------------------
|
|
# 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
|
|
fi
|
|
|
|
logger -t xcat "Install: Setup NTP"
|
|
|
|
echo "server $master" >$conf_file
|
|
|
|
mkdir -p /etc/ntp
|
|
chown ntp /etc/ntp
|
|
|
|
echo "driftfile /var/lib/ntp/drift
|
|
restrict 127.0.0.1
|
|
authenticate no" >>$conf_file
|
|
|
|
service ntpd stop
|
|
ntpdate $master
|
|
service ntpd start
|