Time Syncing

Jonathan I. Kamens jik at athena.mit.edu
Mon Mar 11 11:37:13 AEST 1991


In article <27daccc2.539b at petunia.CalPoly.EDU>, guy at library.calpoly.edu (Guy Martin) writes:
|> I have a problem I am hoping someone out there can give me some help on.
|> I am trying to sync our system time (Symmetry 27) with another local
|> host.  I have tried using a shell script I wrote that simply telnets
|> to the said host's telnet port 13 to return their time stamp.  This
|> works fine when I run it as root from a terminal.  However, cron
|> spits it out as telnet requires a controlling tty to be present to
|> execute correctly.

  1) You can write a program to connect to port 13 on the remote host and get
the time string; using telnet is overkill.  Then you avoid the problem of
telnet requiring a tty to run on.  If you don't want to write the program, we
have one at Athena for which I can send you the sources, although I don't
guarantee it'll compile on your system.

  2) You can use the "pty" package to get telnet to run from cron.  Available
at a comp.sources.unix archive site near you.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710



More information about the Comp.unix.questions mailing list