problem with ntp server

Hi NG,

I try to sync my linux machine with a NTP server. The time has to be written to hardware clock and all has to work at runtime - my machine will never shutdown - only way to reboot is a reset/watchdog/power cycle.

I try to run a startup script:

–snip–
loopC=0
until /usr/sbin/rcntp ntptimeset > /dev/null; do
echo “retrying sync with timeserver, result was $?”
sleep 1
loopC=$((loopC+1));
if $loopC -gt 4 ]; then
echo “giving up”
break;
fi
done

/sbin/hwclock --systohc
date
–snip–

but it isn’t working.

When I reset After this script, the hardware clock doesn’t show correct time/date. running the commands manually at console, seems to work. What could be by fault?

thanks in advice

Thomas
TFrei is online now Report Post Reply With Quote

I may missing something, but why do you not confugure/start NTP with YaST > Network services > NTP configuration?

rcntp start