1 |
Yoann Pannier wrote: |
2 |
|
3 |
>Olinux wrote: |
4 |
> |
5 |
> |
6 |
>>Il faut à ce propos que je trouve une doc (fr si possible ou très courte |
7 |
>>si en) pour la synchronisation de l'heure du pc avec un serveur de date |
8 |
>>ou avec la freebox. |
9 |
>> |
10 |
>> |
11 |
> |
12 |
>* D'abord : |
13 |
> |
14 |
>#emerge net-misc/ntp -va |
15 |
> |
16 |
>* Si c'est une machine allumée 24/7, le plus simple à mon avis si tu ne |
17 |
>veux pas mettre en place ton propre serveur de temps, c'est de faire un |
18 |
>cron journalier : |
19 |
> |
20 |
>#echo \#\!/bin/sh > /etc/cron.dayly/ntpdate.cron |
21 |
>#echo nice ntpdate -s fr.pool.ntp.org \>/dev/null 2\>\&1 >> |
22 |
>/etc/cron.dayly/ntpdate.cron |
23 |
>#chmod a+x /etc/cron.dayly/ntpdate.cron |
24 |
> |
25 |
> |
26 |
d'accord, c'est fait, j'ai juste remplacé le dayly par daily |
27 |
il n'y a que cela à faire ? ( avec le rc-upadte et le start) |
28 |
et ça le met à l'heure à quel moment ? (quelle heure en fait) ? |
29 |
|
30 |
>* Si c'est un desktop qui est souvent eteint : |
31 |
>Editer /etc/conf.d/ntp-client |
32 |
>Moi, j'ai NTPCLIENT_CMD="ntpdate" et NTPCLIENT_OPTS="-Q -s fr.pool.ntp.org" |
33 |
> |
34 |
> |
35 |
moi j'ai ca, presque pareil, |
36 |
|
37 |
# Copyright 1999-2004 Gentoo Foundation |
38 |
# Distributed under the terms of the GNU General Public License v2 |
39 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.confd,v |
40 |
1.8 2004/08/25 14:31:10 vapier Exp $ |
41 |
|
42 |
# Command to run to set the clock initially |
43 |
# Most people should just leave this line alone ... |
44 |
# however, if you know what you're doing, and you |
45 |
# want to use ntpd to set the clock, change this to 'ntpd' |
46 |
NTPCLIENT_CMD="ntpdate" |
47 |
|
48 |
# Options to pass to the above command |
49 |
# Most people should just uncomment this variable and |
50 |
# change 'someserver' to a valid hostname which you |
51 |
# can aquire from the URL's below |
52 |
NTPCLIENT_OPTS="-Q -u pool.ntp.org" |
53 |
|
54 |
# How long to wait (in seconds) before giving up. |
55 |
# Useful for when you boot and DNS/internet isn't |
56 |
# really available but you have your net interface |
57 |
# come up with say a static IP. |
58 |
NTPCLIENT_TIMEOUT=30 |
59 |
|
60 |
## |
61 |
# A list of available servers can be found here: |
62 |
# http://www.pool.ntp.org/ |
63 |
# A good way to get servers for your machine is: |
64 |
# netselect -s 3 pool.ntp.org |
65 |
|
66 |
en tout cas ca à l'air de bien fonctionner, merci beaucoup, je garde le |
67 |
mail et je l'imprime... |
68 |
amicalement, |
69 |
olivier |
70 |
|
71 |
|
72 |
>#rc-update add ntp-client default |
73 |
>#/etc/init.d/ntp-client start |
74 |
> |
75 |
>Et voilà ton pc est mis à l'heure une fois par jour ou/et à chaque fois |
76 |
>que tu le démarre (les 2 méthodes peuvent biensûr coexister). |
77 |
> |
78 |
>Je ne connais pas la freebox, mais si elle fait serveur de temps |
79 |
>j'imagine que ce serait mieux de remplacer fr.pool.ntp.org par l'ip de |
80 |
>la boîte en question. |
81 |
> |
82 |
> |
83 |
|
84 |
-- |
85 |
gentoo-user-fr@g.o mailing list |