home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / aix / 12647 < prev    next >
Encoding:
Internet Message Format  |  1992-12-17  |  1.9 KB

  1. Path: sparky!uunet!spool.mu.edu!yale.edu!ira.uka.de!fauern!uni-erlangen.de!faui63.informatik.uni-erlangen.de!horst
  2. From: horst@faui63.informatik.uni-erlangen.de (Horst Luehrsen)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: xntp and rc files
  5. Date: Thu, 17 Dec 1992 16:37:44 GMT
  6. Organization: IMMD 6 - Lehrstuhl fuer Datenbanksysteme
  7. Distribution: world
  8. Message-ID: <1gqacoEINNhb1@uni-erlangen.de>
  9. References: <1992Dec15.230028.68@rcwusr>
  10. Reply-To: horst@faui63.informatik.uni-erlangen.de (Horst Luehrsen)
  11. NNTP-Posting-Host: faui63.informatik.uni-erlangen.de
  12. Lines: 52
  13.  
  14.  
  15. In article <1992Dec15.230028.68@rcwusr>, jenkinsonjp@rcwusr.bp.com writes:
  16. >From: jenkinsonjp@rcwusr.bp.com
  17. >Newsgroups: comp.unix.aix
  18. >Subject: xntp and rc files
  19. >
  20. >how do *YOU* get xntp started at boot? scripts that work don't when
  21. >invoked as an rc file. reboot opportunities are rare, so hints appreciated.
  22. >
  23. I start xntp in /etc/rclocal, startet from init. But sometimes xntp doesn't
  24. come up after a reboot, so I use:
  25.  
  26. /etc/rc.local:
  27. ...
  28. if [ -x /usr/local/etc/ntpdate ]; then
  29.         /usr/local/etc/ntpdate ntps1-0 ntps1-1 ntps2-1
  30.         echo " ntpdate"
  31. fi
  32.  
  33. if [ -x /usr/local/etc/xntpd -a -f /usr/local/etc/ntp.conf ]; then
  34.         /usr/local/etc/xntpd -c /usr/local/etc/ntp.conf
  35.         echo " xntpd"
  36. fi
  37.  
  38. echo "ksh /etc/xntp.restart" | at now+2minutes
  39.  
  40. /etc/xntp.restart:
  41. ...
  42. ps -ef | grep -v grep | grep xntpd
  43. if [[ $? = 0 ]]
  44. then
  45.     echo "xntp Version 3 time service already running"
  46. else
  47.     echo "Starting xntp Version 3 time service..."
  48.  
  49.     if [ -x /usr/local/etc/ntpdate ]; then
  50.         /usr/local/etc/ntpdate ntps1-0 ntps1-1 ntps2-0
  51.         echo " ntpdate"
  52.     fi
  53.  
  54.     if [ -x /usr/local/etc/xntpd -a -f /usr/local/etc/ntp.conf ]; then
  55.         /usr/local/etc/xntpd -c /usr/local/etc/ntp.conf
  56.         echo " xntpd"
  57.     fi
  58. fi
  59.  
  60.     Horst
  61. --
  62.  Horst Luehrsen <luehrsen@informatik.uni-erlangen.de>
  63.  Martensstrasse 3, W-8520 Erlangen
  64.  Tel: +49-9131-857884  Fax:+49-9131-32090
  65.  ** No keyboard - Press F1 to continue! **
  66.