Unix Technical Forum

Setting Gentoo to use internet clock

This is a discussion on Setting Gentoo to use internet clock within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> I'm using Mandrake to use the timeclock syncronized to the internet and wondered if it was simple to do ...


Go Back   Unix Technical Forum > Unix Operating Systems > Gentoo Linux Support

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-21-2008, 08:52 AM
Unknown
 
Posts: n/a
Default Setting Gentoo to use internet clock

I'm using Mandrake to use the timeclock syncronized to the internet and
wondered if it was simple to do with Gentoo as well?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-21-2008, 08:52 AM
Andy Fraser
 
Posts: n/a
Default Re: Setting Gentoo to use internet clock

In alt.os.linux.gentoo, Unknown uttered these immortal words:

> I'm using Mandrake to use the timeclock syncronized to the internet and
> wondered if it was simple to do with Gentoo as well?


Install and set up ntp.

--
Andy.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-21-2008, 08:52 AM
Unknown
 
Posts: n/a
Default Re: Setting Gentoo to use internet clock

On Mon, 27 Dec 2004 20:24:27 +0000, Andy Fraser wrote:

> In alt.os.linux.gentoo, Unknown uttered these immortal words:
>
>> I'm using Mandrake to use the timeclock syncronized to the internet and
>> wondered if it was simple to do with Gentoo as well?

>
> Install and set up ntp.


I've installed ntp and done

rc-update add ntpd boot

and it runs the daemon at startup but I don't know where to go from there.
All I want it to do is set my hardware clock at boot.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-21-2008, 08:52 AM
elsifaka
 
Posts: n/a
Default Re: Setting Gentoo to use internet clock

Unknown a écrit :
> On Mon, 27 Dec 2004 20:24:27 +0000, Andy Fraser wrote:
>
>
>>In alt.os.linux.gentoo, Unknown uttered these immortal words:
>>
>>
>>>I'm using Mandrake to use the timeclock syncronized to the internet and
>>>wondered if it was simple to do with Gentoo as well?

>>
>>Install and set up ntp.

>
>
> I've installed ntp and done
>
> rc-update add ntpd boot
>
> and it runs the daemon at startup but I don't know where to go from there.
> All I want it to do is set my hardware clock at boot.


use ntp-client :
edit /etc/conf.d/ntp-client
#/etc/init.d/ntp-client start
#rc-update add ntp-client boot
--
Talkin'Loud & Sayin' Nothing
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-21-2008, 08:52 AM
Andy Fraser
 
Posts: n/a
Default Re: Setting Gentoo to use internet clock

In alt.os.linux.gentoo, Unknown uttered the immortal words:

> I've installed ntp and done
>
> rc-update add ntpd boot
>
> and it runs the daemon at startup but I don't know where to go from there.


It works transparently. Look in /etc/ntp.conf.

> All I want it to do is set my hardware clock at boot.


Use ntp-client instead of ntpd then.

--
Andy.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-21-2008, 08:52 AM
jim
 
Posts: n/a
Default Re: Setting Gentoo to use internet clock

Unknown wrote:

> I'm using Mandrake to use the timeclock syncronized to the internet and
> wondered if it was simple to do with Gentoo as well?

I use this script in my /etc/cron.daily directory

#!/bin/bash
#Sets time
rdate -s clock-1.cs.cmu.edu && /sbin/hwclock --systohc

you will need to make sure the script is executable, and that you run cron
or anacron and you will need to have emerged rdate.

I like this method because I don't need another client or daemon running.

--
jim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-21-2008, 08:52 AM
Unknown
 
Posts: n/a
Default Re: Setting Gentoo to use internet clock

I've done as you said but I get the error at startup saying unknown host
www.pool.ntp.org (or something close to it, I can't find the log file)!
However eth0 is setup after this point so could the problem be due to
having no network available when trying to get internet time?
How do I ensure the network is configured before ntp-client attempts to
set the clock?
Many thanks for your help so far.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-21-2008, 08:52 AM
Andy Fraser
 
Posts: n/a
Default Re: Setting Gentoo to use internet clock

In alt.os.linux.gentoo, Unknown uttered the immortal words:

> I've done as you said but I get the error at startup saying unknown host
> www.pool.ntp.org (or something close to it, I can't find the log file)!


Something close to it? The exact URL would be helpful. The URL for the
ntp.org pool is pool.ntp.org.

> However eth0 is setup after this point so could the problem be due to
> having no network available when trying to get internet time?
> How do I ensure the network is configured before ntp-client attempts to
> set the clock?


You don't. Gentoo's init scripts use dependencies (have a look at some of
them). ntp-client needs "net" so Gentoo should bring the network up before
running ntp-client.

In a previous post you say that ntp is starting in runlevel boot. By default
(if you follow the handbook to the letter) net.eth0 starts in runlevel
default so ntp-client should probably start in runlevel default too.

--
Andy.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:50 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com