Pythontr

husonet | Tarih: 04.07.2012

ntpdate ayarları

. Ntpdate
. istemci kurulumu
		aptitude install ntpdate
aptitude install openntpd # squeeze-backports


. vim /etc/default/openntpd
		DAEMON_OPTS="-s -f /etc/openntpd/ntpd.conf"

. ilk saat ayarı
		ntpdate-debian
hwclock -w


# DEPRACED: Artik openntpd kuruldugu icin manuel script hazirlamaya gerek kalmadi.
# Bu nedenle asagida yer alan ntp ile ilgili islemlere artık yapilmayacaktir.
. /root/scripts/cron_ntpdate.sh
		#!/bin/sh
### BEGIN INIT INFO
# Provides: ntpdate
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2
# Default-Stop:
# Short-Description: ntpdate
### END INIT INFO

echo "Ntpdate update"
(ntpdate-debian >/dev/null 2>&1 && hwclock -w >/dev/null 2>&1) &
# USB stick kurulumu ise donanım saatini değiştirme, ustteki satiri iptal et
(ntpdate-debian >/dev/null 2>&1) &


. /etc/crontab
		03 *    * * *   root    /root/scripts/cron_ntpdate.sh >/dev/null 2>&1


. init.d ayarları
		cd /etc/init.d/
ln -s /root/scripts/cron_ntpdate.sh ntpdate
update-rc.d ntpdate start 99 2 .