Description of problem:
I tried adding a serial console to my RH9 box. Part of this involved adding the
following line to /etc/inittab:
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:
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):
Steps to Reproduce:
1. Add "S0:12345:respawn:/sbin/mingetty ttyS0" to /etc/inittab
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
Created attachment 90919 [details]
Patch to fix the regex on line 38 of /etc/rc.d/rc.sysinit
Works for me.
Hm, yeah, actually, we don't set up serial consoles with mingetty here (we use
agetty), so we didn't see this.
This is changed differently in current code.
Will be in 7.25-1.