Thanks to Spider Boardman <spider_at_orb.nashua.nh.us> for
helping.
The original question was:
>> I'm searching for additional information about what getty does
>> with the parameters "terminal" and "line_discpipline".
>>
>> The "terminal" parameter is fairly obvious but how does getty
>> handle over the information to the login program?
"line_discipline" is simply to be ignored:
>The "line_discipline" parameter is historical. Ignore it. (If
>you do provide it, I think the only legal value is "POSIX".)
In OSF getty sets the TERM variable according to the getty "term"
command line entry in inittab. It is not possible to use
getttynam() in DEC Unix, instead the login program must preserve
the TERM variable if it is set:
>The "terminal" parameter is set into the TERM environment
>variable by getty. Because the OSF (SysV-like) getty is too
>stupid to do proper environment handling (unlike the BSD getty),
>the login program special-cases that environment variable even
>when "-p" is not specified, so that the value provided by getty
>will be preserved.
I wanted to use the bsd-ish login program provided with the
kerberos-4.10 distribution. Logging in via LAT/serial was fine
after modifying login to always save the TERM variable in all cases.
The problem will not occur when using telnet, since login is
called differently.
It might be possible to use getutline() to obtain login
terminal type:
> Because of the SysV-style terminal initialisation, getttynam() is
> nearly useless, unless you only wanted the security information.
> Which is sort of too bad, even though I mostly approve of the
> /etc/inittab and /sbin/rc? and /sbin/rc?.d/ and /sbin/init.d/
> system initialisation. It may be possible (I haven't given this
> any thought or experimentation) to use getutline() to determine a
> line's "id" from /etc/inittab, and then scan that file, but it
> doesn't seem worth it to me. The associated terminal type in
> /etc/ttys on ULTRIX or in /etc/inittab on OSF is only a "best
> guess" for most ports, anyway, and doesn't seem that interesting
> once another value has been set.
Thanks! / Ilja
--
hallberg_at_e.kth.se; Ilja Hallberg
School of E.E. Royal Institute of Technology, Sweden.
Received on Thu Apr 20 1995 - 13:03:55 NZST