Bug 97188 - Incorrect tty search when setting console fonts at boot time
Summary: Incorrect tty search when setting console fonts at boot time
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
: 116514 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-06-11 12:02 UTC by Tarhon-Onu Victor
Modified: 2014-03-17 02:36 UTC (History)
2 users (show)

Fixed In Version: 7.25-1
Clone Of:
Environment:
Last Closed: 2003-06-11 16:11:20 UTC
Embargoed:


Attachments (Terms of Use)

Description Tarhon-Onu Victor 2003-06-11 12:02:24 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030611

Description of problem:
In rc.sysinit, begining with line 37:

== cut ==
if [ "`/sbin/consoletype`" = "vt" -a -x /sbin/setsysfont ]; then
   for i in `LC_ALL=C grep '^[0-9]*.*respawn:/sbin/mingetty' /etc/inittab | sed
's/^.* tty\([0-9][0-9]*\).*/\1/g'`; do
      > /dev/tty$i
   done
== cut ==

The regular expression should be: '^[0-9].*respawn:/sbin/mingetty' instead. The
'*' after [0-9] means 0 digits or more, so if there are lines containing
respawn:/sbin/mingetty that will also match the regular expression, causing
unexistent ttys to be written.


Version-Release number of selected component (if applicable):
initscripts-7.24 and older

How reproducible:
Always

Steps to Reproduce:
1. in inittab add a comment before a line coresponding to a tty that should pe
initialised in standard runlevels;
2. grep '^[0-9]*.*respawn:/sbin/mingetty' /etc/inittab
3. grep '^[0-9].*respawn:/sbin/mingetty' /etc/inittab
 and compare outputs.
    

Actual Results:  The output for the grep run at 2. will contain also the
commented line(s) that contain 'respawn:/sbin/mingetty'' string.

Additional info:

This can be anoying then you comment lines in inittab for ttys that where
deleted (let's say you created tty30 for testing purposes and then you deleted)
or are used for other purposes than logging in (logs, whatever).

Comment 1 Bill Nottingham 2003-06-11 16:11:20 UTC
Fixed in CVS, will be in 7.25-1, thanks!

Comment 2 Bill Nottingham 2004-02-22 05:48:32 UTC
*** Bug 116514 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.