1 |
Paul de Vrieze wrote: |
2 |
>>Is there a neat way to just run ntpdate at system initialisation? I |
3 |
|
4 |
> This is allready included in the ntp scripts. Just edit the configuration |
5 |
> file. Btw. ntpd is not a necesarilly server. It takes care that the time |
6 |
> stays correct. Check the ntpd.conf file for restricting the server |
7 |
> capabilities. |
8 |
> |
9 |
Thanks for the advice. This still isn't really what I was after. I want |
10 |
a really lightweight way of making sure that my machines are in |
11 |
reasonable sync, but I'm not really worried about it enough to want to |
12 |
have another daemon process hanging around looking after the time. |
13 |
|
14 |
What I've done is write a 2 line bash script for /etc/init.d/ which just |
15 |
runs ntpdate once using the ntpdate configurations in /etc/conf.d/ntpd, |
16 |
which should be sufficient (Copied below for the terminally lazy ;) ) |
17 |
|
18 |
As an aside: Does anyone know what will happen the next time the package |
19 |
containing /etc/init.d/* is updated? Will it remove my script or is that |
20 |
protected? |
21 |
|
22 |
Cheers, |
23 |
|
24 |
Andy |
25 |
|
26 |
#!/bin/bash |
27 |
# A script to one off launch ntpdate |
28 |
|
29 |
if [ $1 == 'start' ]; then |
30 |
source /etc/conf.d/ntpd; |
31 |
$NTPDATE_CMD $NTPDATE_OPTS; |
32 |
fi |
33 |
|
34 |
|
35 |
|
36 |
-- |
37 |
gentoo-dev@g.o mailing list |