Pejman Moghadam / Fedora

Fedora Core 4 - Time Synchronization and timezone update

Public domain


#!/bin/bash
mkdir -p /usr/src/timezones
cd /usr/src/timezones
wget ftp://elsie.nci.nih.gov/pub/tzdata2009s.tar.gz
tar zxf tzdata2009s.tar.gz
zic -d zoneinfo asia
/bin/cp -r ./zoneinfo/* /usr/share/zoneinfo/
ln -sfn /usr/share/zoneinfo/Asia/Tehran /etc/localtime
cat < /etc/ntp/step-tickers
0.pool.ntp.org
1.pool.ntp.org
2.pool.ntp.org
EOF
chkconfig --level 3 ntpd on
service ntpd stop > /dev/null
ntpdate -v 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org
hwclock -w
service ntpd start
cd -

BY: Pejman Moghadam
TAG: timezone, ntp, hwclock
DATE: 2007-10-09 15:18:41


Pejman Moghadam / Fedora [ TXT ]