Can a script check if my line is dialup?

Bob McGowen x4312 dept208 bob at wyse.wyse.com
Sat Jun 30 01:31:44 AEST 1990


In article <1990Jun29.050949.8906 at midway.uchicago.edu> phd_ivo at gsbacd.uchicago.edu writes:
>I would like a script to execute a number of alias-es and execute
>tset only if I dialup, but not when I login in from my beautiful
------------

Actually, you would want tset to run in all cases.  You just need to
set it so it recognizes the lines that you have.

tset uses the /etc/ttytype file as a database mapping terminal types to
tty lines.  tset also lets you modify just what it does with this
information by using the -m option on its command line.  You should
log in from the console and type tty to get the name the system uses
for login on the console (probably /dev/console but we need to be sure).
Then grep for that name in /etc/ttytype.  This will tell you the name
to use in the tset command line.  Assuming that this name were something
like Next, you would add the following to the existing tset in your
.login (.cshrc, whichever):

	-m Next:Next

You would repeat this for the dialup line or other hardwire lines that
you might use.  The result should look like:

	eval `tset -m Next:Next -m dialup:vt100 .......`

When you use the console, you will get the Next console termcap entry,
when you dial in by modem, you will a vt100 entry, and so on.  Check
the man page for tset for other things to do with tset.

I hope this clears up the problem.

Bob McGowan  (standard disclaimer, these are my own ...)
Product Support, Wyse Technology, San Jose, CA
..!uunet!wyse!bob
bob at wyse.com



More information about the Comp.unix.questions mailing list