Bug 14558

Summary: Incorrect behaviour allscreens section in rc.i386 under certain circumstantions
Product: Base System Reporter: oleg <oleg>
Component: i386Assignee: Sheldon Hearn <sheldonh>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.3-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description oleg 1999-10-27 17:40:00 UTC
	allscreens in rc.i386 have incorrect behaviour, if:
1. value for MAXCONS options in kernel configuration file lower than number of /dev/ttyv* files
2. allscreens in /etc/rc.conf are enabled: allscreens_flags="-m on", for example

	On such circumstantions you will get
	....
	rc.i386 configuring syscons: keymap keychange cursor screen_map font8x16 blank_time
moused allscreens cannot open /dev/ttyv7: no such device or address
	....
	after reboot


	or
3. enabled ttyv*-s number in /etc/ttys lower than MAXCONS or /dev/ttyv* files number

Fix: May be, this patch not solve all problems in this situation?
 I dont now how to retrieve avalaible virtual consoles number from
kernel for correct patch :-(

# diff -crN rc.i386 rc.i386.original
How-To-Repeat: 
	Set 'allscreens_flags="-m on"' in /etc/rc.conf
	Set MAXCONS=6 in /usr/src/sys/i386/conf/YOUR_KERNEL
	config YOUR_KERNEL
	cd ../../compile/YOUR_KERNEL
	make depend
	make all
	make install
	fastboot
...
        rc.i386 configuring syscons: keymap keychange cursor screen_map font8x16 blank_time
moused allscreens cannot open /dev/ttyv7: no such device or address 
.....
Comment 1 Sheldon Hearn 1999-10-28 11:10:02 UTC
On Wed, 27 Oct 1999 19:35:05 +0300, oleg@apholina.marka.net.ua wrote:

> !       for ttyv in `grep ^ttyv /etc/ttys | cut -f 1`
>         do
> !               vidcontrol </dev/$ttyv ${allscreens_flags}
>         done
>   fi
>   echo '.'
> --- 114,122 ----
>   # set this mode for all virtual screens
>   if [ "X${allscreens_flags}" != X"" ] ; then
>         echo -n ' allscreens'
> !       for ttyv in /dev/ttyv*
>         do
> !               vidcontrol <$ttyv ${allscreens_flags}
>         done

Surely this just hides the problem from the administrator? To have ttys
enabled in /etc/ttys but not configured in /dev is an error that should
be addressed, surely?

Certainly, rc.i386 doesn't die because of this, so I don't see the
benefit of the proposed change.

Ciao,
Sheldon.
Comment 2 oleg 1999-10-28 16:52:02 UTC
On 28-Oct-99 Sheldon Hearn wrote:
> 
> 
> On Wed, 27 Oct 1999 19:35:05 +0300, oleg@apholina.marka.net.ua wrote:
> 
>> !       for ttyv in `grep ^ttyv /etc/ttys | cut -f 1`
>>         do
>> !               vidcontrol </dev/$ttyv ${allscreens_flags}
>>         done
>>   fi
>>   echo '.'
>> --- 114,122 ----
>>   # set this mode for all virtual screens
>>   if [ "X${allscreens_flags}" != X"" ] ; then
>>         echo -n ' allscreens'
>> !       for ttyv in /dev/ttyv*
>>         do
>> !               vidcontrol <$ttyv ${allscreens_flags}
>>         done
> 
> Surely this just hides the problem from the administrator? To have ttys
> enabled in /etc/ttys but not configured in /dev is an error that should
> be addressed, surely?
> 
> Certainly, rc.i386 doesn't die because of this, so I don't see the
> benefit of the proposed change.

        Thank you for explanation your point of view.
Maybe this is right opinion. I think you can close this PR#.

> 
> Ciao,
> Sheldon.

        With best wishes
        Oleg V. Naumann

----------------------------------
E-Mail: oleg@Apholina.marka.net.ua
Date: 28-Oct-99
Time: 18:38:35

This message was sent by XFMail
----------------------------------
Comment 3 Sheldon Hearn freebsd_committer freebsd_triage 1999-10-29 09:35:14 UTC
Responsible Changed
From-To: freebsd-bugs->sheldonh

I'm assigning this to myself as a reminder to close it if 
nobody counters my argument any time soon. 
Comment 4 Sheldon Hearn freebsd_committer freebsd_triage 1999-11-01 07:48:47 UTC
State Changed
From-To: open->closed

Both the originator and I feel that the error messages generated 
by the current rc.i386 are useful.