setting TERM on System Vr2
John Ruschmeyer
john at moncol.UUCP
Mon Feb 18 11:38:03 AEST 1985
>> > 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."
More information about the Comp.unix.wizards
mailing list