Bug 30739

Summary: changing terminal type in sysinstall causes abortion
Product: Base System Reporter: alex.neyman <alex.neyman>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.4-RELEASE   
Hardware: Any   
OS: Any   

Description alex.neyman 2001-09-22 17:50:00 UTC
In a screen for setting installation options, user is prompted to choose
the terminal type. The expected behavior is to cycle through cons25 ->
cons25-m -> xterm -> ansi -> vt100 -> cons25w -> cons25. But, after switching
to cons25-m the next attempt to change terminal type causes sysinstall to
die.

Fix: 

I have not dug deeply into it, but a quick glance reveals that xterm is not
present in src/etc/termcap.small. Could this be a culprit?
How-To-Repeat: Press Space on Terminal option in Options menu twice.
Comment 1 Murray Stokely freebsd_committer freebsd_triage 2001-09-24 12:47:45 UTC
State Changed
From-To: open->analyzed

This bug exists in -STABLE and -CURRENT and should be fixed ASAP.  I 
don't believe the problem is with the actual xterm entry since I don't 
think that termcap.small is even put onto the MFSROOT floppy.  The 
panic comes from setterm call.   

lib_setup.c:grab_entry seems to be the culprit, although I'm not sure 
how this function returning error turns into a 0 signal (undefined 
signal in FreeBSD) which then causes init (sysinstall) to die. 

Olgeni added this functionality a few months ago.  If I don't hear 
back from him soon I think we should just backout this whole set 
termcap option.  It's clearly not implemented properly.  In fact, I 
haven't been able to use it without panicing sysinstall a single time. 

It would help to boot into sysinstall, get far enough along so that 
you've got the holographic shell, and then use commands to examine the 
environment variables.  I'm curious if there is a termcap entry setup 
for xterm properly.  termpcap.c (sysinstall src) tries to setup the 
termcap environment variables properly so that the termcap database 
file is never consulted.  I believe this is where the problem lies.
Comment 2 Murray Stokely freebsd_committer freebsd_triage 2001-09-27 22:27:09 UTC
State Changed
From-To: analyzed->closed

This functionality has been backed out in -CURRENT and -STABLE.  It 
will be tested much more thoroughly before being added back in. 
olgeni@FreeBSD.org is working in this area.