Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 88061 - Serial TTYs in /etc/inittab confuse rc.sysinit
Serial TTYs in /etc/inittab confuse rc.sysinit
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
Blocks: 88540
  Show dependency treegraph
Reported: 2003-04-04 21:10 EST by Pete Toscano
Modified: 2014-03-16 22:35 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-06-17 19:03:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to fix the regex on line 38 of /etc/rc.d/rc.sysinit (435 bytes, patch)
2003-04-04 21:27 EST, Pete Toscano
no flags Details | Diff

  None (edit)
Description Pete Toscano 2003-04-04 21:10:55 EST
Description of problem:
I tried adding a serial console to my RH9 box.  Part of this involved adding the
following line to /etc/inittab:

S0:12345:respawn:/sbin/mingetty ttyS0

The for loop on line 38 of /etc/rc.d/rc.sysinit is driven by a grep piped to a sed:

grep '^[0-9]*.*respawn:/sbin/mingetty' /etc/inittab | sed 's/^.* \

It looks like the grep part is trying to pull out all the respawning mingetty
lines dealing with standard (non-serial) TTYs.  Unfortunately, the regex given
to grep doesn't quite work this way.  The above grep pulls out the S0 line too
and the piped-to sed starts outputs the following for the for-loop to iterate over:

S0:12345:respawn:/sbin/mingetty ttyS0

The pattern "^[0-9]*.*respawn:/sbin/mingetty" is as good as
"respawn:/sbin/mingetty" since the first "*" means there can be zero or more
digits at the beginning of the line.  I believe that intended pattern should be:


This will pull out ensure that all lines extracted will begin with at lest one

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Add "S0:12345:respawn:/sbin/mingetty ttyS0" to /etc/inittab
2. Reboot
Actual results:
Errors similar to this...
/etc/rc.d/rc.sysinit: line 39: /dev/ttyS0:12345:respawn:/sbin/mingetty: No such
file or directory
/etc/rc.d/rc.sysinit: line 42: [: ttyS0: integer expression expected

Expected results:
No errors.

Additional info:
Comment 1 Pete Toscano 2003-04-04 21:27:29 EST
Created attachment 90919 [details]
Patch to fix the regex on line 38 of /etc/rc.d/rc.sysinit

Works for me.
Comment 2 Bill Nottingham 2003-04-07 17:12:53 EDT
Hm, yeah, actually, we don't set up serial consoles with mingetty here (we use
agetty), so we didn't see this.
Comment 3 Bill Nottingham 2003-06-17 19:03:50 EDT
This is changed differently in current code.
Comment 4 Bill Nottingham 2003-06-17 19:06:47 EDT
Will be in 7.25-1.

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