
Ian McDonald wrote:
On 6/29/06, Glenn Ramsey <glenn(a)componic.co.nz> wrote:
Hi,
I am trying to get ntpdate to run when my dialup link comes up.
This box is running Debian/stable.
I have put a simple script in /etc/ppp/ip-up.d/ntpdate :
#!/bin/sh /etc/init.d/ntpdate start
All this script does is to run /usr/sbin/ntpdate -u -b -s $NTPSERVERS
However the script hangs and ps indicates that it is sleeping ( S< ). It works fine if I run it manually (as root).
Anyone know why it hangs? How do I make it work?
Glenn
On my debian/unstable to dial up requires it's own group which is not root. Therefore I suspect it needs those root permissions and not getting it.
You can also run commands with strace in front of it and it will show you what system calls are going on. The last one shown should be the one sleeping...
Ian
Thanks Ian, Some further info: it works if I use pon to bring the link up. But I am running linesrv and it is when linesrv brings the link up that ntpdate hangs. According to my linesrv.conf it uses /usr/bin/pon to bring the link up. linesrv is running as root. How would I use strace to diagnose that? Glenn -- Glenn Ramsey <glenn(a)componic.co.nz> 07 8627077 http://www.componic.co.nz