Re: How to keep date/time accurate
From: Cobra (mtcobra_at_gmx.de)
Date: 10/06/03
- Next message: NO SPAMMERS: "Problem with qt3-3.2.1-35 After KDE-3.1.4 Upgrades"
- Previous message: Vincent C Jones: "Re: USB Key : USB 1.1 PQI traveling disk"
- In reply to: Sally Shears: "How to keep date/time accurate"
- Next in thread: Sally Shears: "Re: How to keep date/time accurate"
- Reply: Sally Shears: "Re: How to keep date/time accurate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 6 Oct 2003 17:12:19 +0200
Created a file called gettime (or anything like that) in the /etc/init.d
folder with the following code in it. Activate gettime for runlevel 3 and 5
in the runlevel editor. Then the correct time will be set on startup. An
internet connection must be available at this time!
Don't if that's the best way to do it, but it works ;)
#! /bin/sh
#
# Author: Markus Thiel, 2002
#
# /etc/init.d/gettime
#
### BEGIN INIT INFO
# Provides: gettime
# Required-Start: network route nscd
# Required-Stop:
# Default-Start: 3 5
# Default-Stop: 3 5
# Description: corrects system time
### END INIT INFO
. /etc/rc.status
function error()
{
rc_status -v
exit 0
}
echo -n "getting accurate time"
ping -c 1 -w 10 217.5.113.240 > /dev/null || error
netdate 130.149.17.21 tcp 134.60.1.111 > /dev/null
rc_status -v
- Next message: NO SPAMMERS: "Problem with qt3-3.2.1-35 After KDE-3.1.4 Upgrades"
- Previous message: Vincent C Jones: "Re: USB Key : USB 1.1 PQI traveling disk"
- In reply to: Sally Shears: "How to keep date/time accurate"
- Next in thread: Sally Shears: "Re: How to keep date/time accurate"
- Reply: Sally Shears: "Re: How to keep date/time accurate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|