Hi Andrea,

I think this is a better way to sync the time using a ntp daemon.

/etc/init.d/rc

#! /bin/sh

. /etc/init.d/functions.sh

case "$1" in
        start)
                begin "Initializing ntp"
                /bin/ntpdate -s -b 10.45.2.50

                begin "Sync RTC"
                /sbin/hwclock -w -u

                begin "Starting ntpd"
                start-stop-daemon --start -x /bin/ntpd -- -g
                end $?
                ;;
        stop)
                begin "Stopping ntpd"
                start-stop-daemon --stop -n ntpd
                end $?
                ;;
        *)
        error "Usage: $0 start|stop"
        ;;
esac

Also check that the RTC is supported.

# dmesg | grep rtc

should return

rtc_time        : 11:59:07
rtc_date        : 2008-03-31


Regards,

Lloyd.

-- 
IT Department
Pharma Nord (UK) Ltd
Telford Court
Morpeth
Northumberland
NE61 2DB
Tel:. +44 1670 519 989
Fax:. +44 1670 534 903


Reply via email to