[comp.unix.misc] UNIX Callback Program

hugh@slee01.srl.ford.com (Hugh Fader) (04/29/91)

Does anyone know of a program which I can run on my Sun at work which
will automatically call back my PC at home after I run it. We
have such a program on our VAXen but I don't want to have to hop
though a VAX to get to the Sun. One potential catch is that there is
no modem attached directly to the Sun. There is a modem pool on the
network which the Sun can access just like any other host.

Here is the procedure I would like to be able to use:

    1. I dial in to the modem pool from home.

    2. I log on to the Sun.

    3. I run the call back program.

    4. I log off and hang up.

    5. Two minutes later the callback program calls me.

Thanks in advance.



--
Hugh Fader
hugh@slee01.srl.ford.com

mvadh@cbnews.cb.att.com (andrew.d.hay) (05/08/91)

In article <41301@fmsrl7.UUCP> hugh@slee01.srl.ford.com (Hugh Fader) writes:
"Does anyone know of a program which I can run on my Sun at work which
"will automatically call back my PC at home after I run it. We
"have such a program on our VAXen but I don't want to have to hop
"though a VAX to get to the Sun. One potential catch is that there is
"no modem attached directly to the Sun. There is a modem pool on the
"network which the Sun can access just like any other host.

in the sV world, there's ct (call terminal).  it works like cu; it can
access any device configured in /usr/lib/uucp, but spawns getty when
it connects.  (if you don't know how to make uucp tap a modem pool, go
back and *RTFM*!)

i used to spawn it from at-jobs, when i *knew* i'd be working @home.

-- 
Andrew Hay		+------------------------------------------------------+
Ragged Individualist	| 			JAAAAAAANE!		       |
AT&T-BL Ward Hill MA	|	    HOW DO YOU STOP THIS CRAZY THING?	       |
a.d.hay@att.com		+------------------------------------------------------+

kenney@hsi86.hsi.com (Brian Kenney) (05/09/91)

In article <41301@fmsrl7.UUCP> hugh@slee01.srl.ford.com (Hugh Fader) writes:
"Does anyone know of a program which I can run on my Sun at work which
"will automatically call back my PC at home after I run it. We
"have such a program on our VAXen but I don't want to have to hop
"though a VAX to get to the Sun. One potential catch is that there is
"no modem attached directly to the Sun. There is a modem pool on the
"network which the Sun can access just like any other host.

You can try a program called expect.  It is available *somewhere*
on the net (sorry, I don't remember where).  It allows programs
that require a tty (like tip) to run without one.  I have written
an expect script that calls me back after I run it.  Works well.

Here is the first page of its man entry:

EXPECT(1)	    UNIX Programmer's Manual		EXPECT(1)


NAME
     expect - programmed dialogue with interactive programs

SYNOPSIS
     expect [ -d ] [ -c cmds ] [[ -f ] cmdfile ] [ args ]

INTRODUCTION
     expect is a program that "talks" to other interactive pro-
     grams according to a script.  Following the script, expect
     knows what can be expected from a program and what the
     correct response should be.  An interpreted language pro-
     vides branching and high-level control structures to direct
     the dialogue.  In addition, the user can take control and
     interact directly when desired, afterward returning control
     to the script.

     The name "expect" comes from the idea of send/expect
     sequences popularized by uucp, kermit and other modem con-
     trol programs.  However unlike uucp, expect is generalized
     so that it can be run as a user-level command with any pro-
     gram and task in mind.  (expect can actually talk to several
     programs at the same time.)

     For example, here are some things expect can do:

	  +   Cause your computer to dial you back, so that you
	      can login without paying for the call.

	  +   Start a game (e.g., rogue) and if the optimal con-
	      figuration doesn't appear, restart it (again and
	      again) until it does, then hand over control to
	      you.

	  +   Run fsck, and in response to its questions, answer
	      "yes", "no" or give control back to you, based on
	      predetermined criteria.

	  +   Connect to another network or BBS (e.g., MCI Mail,
	      CompuServe) and automatically retrieve your mail so
	      that it appears as if it was originally sent to
	      your local system.

     There are a variety of reasons why the shell cannot perform
     these tasks.  (Try, you'll see.) All are possible with
     expect.

SEE ALSO
     Tcl(3)
     "expect: Curing Those Uncontrollable Fits of Interactivity"
     by Don Libes, Proceedings of the Summer 1990 USENIX Confer-
     ence, Anaheim, California, June 11-15, 1990.
     "Tcl: An Embeddable Command Language" by John Ousterhout,
     Proceedings of the Winter 1990 USENIX Conference, Washing-
     ton, D.C., January 22-26, 1990.p

AUTHOR
     Don Libes, National Institute of Standards and Technology
-- 
Brian Kenney                                       kenney@hsi.com 
3M Health Information Systems                      Wallingford, CT
------------------------------------------------------------------------------
"It's not innovation... but it's close."    

josevela@mtecv2.mty.itesm.mx (Jose Angel Vela Avila) (05/14/91)

 expect is available in durer.cme.nist.gov in /pub/expect.shar.Z
  you also need TCL (Tool Command Language) to compile it, it is in
  prep.ai.mit.edu /pub/gnu.

 It is an invaluable program

Bye

Jose A. Vela A.
josevela@mtecv2.mty.itesm.mx