Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!burl!codas!mtune!rutgers!psuvax1!psuhcx!wcw From: wcw@psuhcx.UUCP Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: /etc/remote entries like L.sys Message-ID: <3061@psuvax1.psu.edu> Date: Fri, 6-Nov-87 18:12:06 EST Article-I.D.: psuvax1.3061 Posted: Fri Nov 6 18:12:06 1987 Date-Received: Sun, 8-Nov-87 17:35:14 EST References: <1087@ur-valhalla.UUCP> Sender: netnews@psuvax1.psu.edu Reply-To: wcw@psuhcx (William C Ward) Organization: Penn State University, University Park, PA Lines: 64 Keywords: tip cu /etc/remote L.sys Xref: utgpu comp.unix.wizards:4977 comp.unix.questions:4295 In article <1087@ur-valhalla.UUCP> deke@ur-valhalla.UUCP (Dikran Kassabian) writes: >asynch communications can easily reach virtually every phone and >computer on campus. I'm looking for a way to connect to remote >systems (which involves responding to one or two prompts) without >intervention required. > >look at. Ideally, the type of entries I use in L.sys for han- >dling this very same situation in uucp would work. C-kermit (available from comp.unix.sources archives, if not elsewhere) will handle chat-scripts in the general syntax of L.sys files. Strange as it may seem, this may be exactly what you need for strange `networks' where you need versatility, if not sophistication. If you don't want to use kermit, you can always quit once the connection has been estabilshed and then start your target program. Since you asked for some examples, I'm including a shell script that I use to a nearby VAX/VMS cluster twice a day for new mail. This is a real hack, but it's a somewhat creative use of kermit, and for the moment it's the only means we have. It could be made much more elegant, but this is the easy fix. I hope you find it useful. #!/bin/sh This is vmsmail # script to poll the VMS system for any new mail using C-kermit # Each user to poll is specified on the command line, which would # typically be in a crontab file. Every (UNIX) user has a the vax # login sequence in the file .vaxrc in # his/her HOME directory. # All new mail is kept in a temporary file on the vax called NCL.MAI. # If there is no new mail, this file doesn't exit and the kermit # `get' falls through and the script logs off. if [ -r /usr/spool/uucp/LCK..tty0 ] then echo "VAX poll failed...line tty0 locked" | mail root exit 0 fi cd /usr/spool/uucppublic for USER in $* do /usr/local/kermit << @@@ take /user/$USER/.vaxrc script -- ~r $ delete~sncl.mai;* script -- ~r $ mail MAIL> SELECT/NEW MAIL> EXTRACT/ALL~sncl.mai MAIL> DEL/ALL MAIL> exit script -- ~r $ kermit 32>--32>--32> server get ncl.mai bye @@@ if [ -s ncl.mai ] then mail $USER < ncl.mai rm -f ncl.mai fi done A sample .vaxrc file: set modem-dialer direct set line /dev/tty0 set baud 9600 script -- ~r T12:--T12: v Switching... ~r~r name:--name: ID word:--word: PASSWORD $--$--$--$ Bill Ward wcw@psuhcx.bitnet psuvax1!ncl!wcw.uucp Disclaimer: Are you kidding? I'm a grad student! If anyone shared my opinions, they would already have claimed authorship.