[Voyage-linux] NTP date synchronization doesn't work depending on the network

Jorge Peña (spam-protected)
Wed Sep 17 23:04:15 HKT 2008


ok, I just set the variable  NTPDATE_USE_NTP_CONF to "no"

and then I changed the server in $NTPSERVERS.

Thank you very much!


> Date: Wed, 17 Sep 2008 21:21:47 +0800
> From: punkytse at punknix.com
> To: cotarelo2 at hotmail.com
> Subject: Re: [Voyage-linux] NTP date synchronization doesn't work depending on	the network
> 
> Hi Jorge,
> 
> I don't understand.  Why setting $NTPSERVERS in /etc/default/ntpdate 
> won't work?
> 
> Regards,
> Punky
> 
> 
> Jorge Peña wrote:
> > Hello again,
> >
> > There  is no /etc/ntp.conf
> >
> > and
> >
> > in /etc/default/ntpdate the variable : NTPDATE_USE_NTP_CONF is set to 
> > yes (it should take the servers from /etc/ntp.conf but it doesn't 
> > exist this file)
> >
> > I found also in a script in: /etc/network/if-up.d/ntpdate
> >
> > #!/bin/sh
> >
> > if [ ! -x /usr/sbin/ntpdate-debian ]; then
> >         exit 0
> > fi
> >
> > if [ "$METHOD" = loopback ]; then
> >         exit 0
> > fi
> >
> > # This is a heuristic:  The idea is that if a static interface is brought
> > # up, that is a major event, and we can put in some extra effort to fix
> > # the system time.  Feel free to change this, especially if you regularly
> > # bring up new network interfaces.
> > if [ "$METHOD" = static ]; then
> >         OPTS="-b"
> > fi
> >
> > /usr/sbin/ntpdate-debian -s $OPTS 2>/dev/null &
> >
> >
> > I also checked /usr/sbin/ntpdate-debian this scipt contains:
> >
> > #!/bin/sh
> >
> > set -e
> >
> > if [ -r /etc/default/ntpdate ]; then
> >         . /etc/default/ntpdate
> > fi
> >
> > if [ "$NTPDATE_USE_NTP_CONF" = yes ]; then
> >         if [ -r /etc/ntp.conf.dhcp ]; then
> >                 file=/etc/ntp.conf.dhcp
> >         elif [ -r /etc/ntp.conf ]; then
> >                 file=/etc/ntp.conf
> >         fi
> >         if [ -n "$file" ]; then
> >                 NTPSERVERS=$(sed -rne 's/^(server|peer) 
> > ([-_.[:alnum:]]+).*$/\2/p' "$file" | grep -v '^127\.127\
> >         fi
> > elif [ -r /etc/default/ntpdate.dhcp ]; then
> >         . /etc/default/ntpdate.dhcp
> > fi
> >
> > exec /usr/sbin/ntpdate $NTPOPTIONS "$@" $NTPSERVERS
> >
> >
> > But there is also not the file : /etc/ntp.conf.dhcp so I don't know 
> > from where is getting the servers...
> >
> > Thank you again,
> > Jorge
> >
> >
> > > Date: Wed, 17 Sep 2008 15:43:48 +0800
> > > From: punkytse at punknix.com
> > > To: cotarelo2 at hotmail.com
> > > CC: voyage-linux at voyage.hk
> > > Subject: Re: [Voyage-linux] NTP date synchronization doesn't work 
> > depending on the network
> > >
> > > Hi Jorge,
> > >
> > > If you use ntpdate, please take a look at /etc/default/ntpdate
> > >
> > > If you use ntpd, most probably /etc/ntp.conf
> > >
> > > Regards,
> > > Punky
> > >
> > > Jorge Peña wrote:
> > > > Hello List
> > > >
> > > > I have a ALIX board powered by a Voyage Linux 0.5.2
> > > >
> > > > Whenever I connect the box to a normal (cable) connection it gets the
> > > > time from the network perfectly.
> > > >
> > > > Whenever I connect the same box it to a internal firewalled network
> > > > and it boots, it doesn't get time from the network. I think I need to
> > > > change the server to a local machine in my own network which has a
> > > > time server. I tried to add it to the configuration in voyage but 
> > I am
> > > > not quite sure where do I need to add the server in the configuration
> > > > file of ntp in voyage.
> > > >
> > > > Any hint?
> > > >
> > > > Regards,
> > > > Jorge
> > > >
> > > > 
> > ------------------------------------------------------------------------
> > > > ¡Trónchate de risa con los mejores capítulos de South Park en MSN
> > > > Vídeo!
> > > > 
> > <http://video.msn.com/?mkt=es-es&vid=42a9e969-45ad-4c31-bff9-57629e71fac8&playlist=videoByUuids:uuids:e1daa69b-331b-4e99-8325-c936aaee9f97%2Cad4cb47a-90a8-4b2c-88da-116d2059f4a2%2Cddaade1e-82b2-4914-8277-35e45198f5c6%2C42860247-e337-4384-94d8-fa444cb4aea7&from=hotmail&tab=s1207179071824> 
> >
> > > >
> > > > 
> > ------------------------------------------------------------------------
> > > >
> > > > _______________________________________________
> > > > Voyage-linux mailing list
> > > > Voyage-linux at list.voyage.hk
> > > > http://list.voyage.hk/mailman/listinfo/voyage-linux
> > > >
> > >
> > >
> > > --
> > > Regards,
> > > Punky
> > >
> > > Voyage Solutions (http://solution.voyage.hk)
> > > * Embedded Solutions and Systems
> > > - Mesh Networking, Captive Portal, IP Surveillance, VoIP/PBX
> > > - Network Engineering, Development Platform and Consultation
> > >
> > >
> > >
> >
> > ------------------------------------------------------------------------
> > ¡Haz tu clic solidario y ayuda a África! ¡Puedes empezar ahora! 
> > <http://www.unclicsolidario.com/>
> 

_________________________________________________________________
Prueba los prototipos de los últimos en MSN Motor
http://motor.es.msn.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.voyage.hk/pipermail/voyage-linux/attachments/20080917/6c7bcad9/attachment.html>


More information about the Voyage-linux mailing list