Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site moncol.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!vax135!petsd!moncol!john From: john@moncol.UUCP (John Ruschmeyer) Newsgroups: net.unix-wizards Subject: Re: setting TERM on System Vr2 Message-ID: <190@moncol.UUCP> Date: Sun, 17-Feb-85 20:38:03 EST Article-I.D.: moncol.190 Posted: Sun Feb 17 20:38:03 1985 Date-Received: Wed, 20-Feb-85 03:34:37 EST References: <437@ihuxo.UUCP> Organization: Monmouth College, West Long Branch, NJ 07764 Lines: 52 >> > Anyone know of a good method to keep TERM information for System V? >> > I know that you can type TERM=xxx when typing your login >> > name, but we have a lot of hardwired terminals, and it would be >> > more convenient to have that terminal types kept in a file and >> > have it be set automatically. >> >> Step 1 - rip "login" so that it doesn't destroy the environment it's >> given, but adds to it. >> >> Step 2 - make your "inittab" lines look like: >> >> hb::respawn:env TERM=vt100 /etc/getty ttyhb 9600 # Console VT100 >> ... >Or put a test in the .profile > >if [ `tty` = "/dev/tty??" ] >then > TERM=5620 # or whatever >fi > Forgive me if I'm missing something obvious (we run v7), but why not this: 1) Set up a file with a name like '/etc/ttynames'. It contains lines of the form: tty1 adm3a tty2 5620 . . . 2) Run the following shell script from the .profile a=`tty` b=`basename $a` awk '$1='$b' {print $2}' /etc/ttynames I may be a bit off on the awk invocation, but you should get the idea. This is how we did it here. -- John Ruschmeyer ...!vax135!petsd!moncol!john Monmouth College ...!princeton!moncol!john W. Long Branch, NJ 07764 "Everybody knows in the second life, We all come back sooner or later. As anything from a pussy cat, To a man-eating alligator."