Christian Dysthe <[EMAIL PROTECTED]> writes: | Hi, | | I have installed xntp3 (running slink). However, the daemon is stared from | init.d and I am not yet online. The log tells me that the network is not | available (what a surprise!;). | | How do I best utilize xntp on a dialup box? Could I put something in | ppp-up and ppp-down? If this is the case, what?
As root, in /etc/ppp/ip-up.d create a file called something, e.g., timesync. In that file should be: --------------------Start file timesync------------- #!/bin/sh if [ -x /etc/init.d/xntp3 ] then /etc/init.d/xntp3 stop > /dev/null 2>&1 fi if [ -x /usr/sbin/netdate ] then /usr/sbin/netdate your.xntp3.server > /dev/null 2>&1 fi if [ -x /etc/init.d/xntp3 ] then /etc/init.d/xntp3 restart > /dev/null 2>&1 fi exit 0 --------------------End file timesync------------- Don't copy the lines with "-----" on them and make sure you substitute a real machine name, or IP address, for "your.xntp3.server". Now do "chmod 700 timesync" and you should be set. Of course, you can make the script nicer, and personally I never bother with the ip-down thing to stop xntp. It will run, and probably write complaints in the log, when you don't have a network connection but I just ignore the messages. This is on a Debian "slink" system. I do something different since I use my own scripts for dialup so take this solution as is, i.e., untested. Gary