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/^.* \ tty\([0-9][0-9]*\).*/\1/g' 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: 1 2 3 4 5 6 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: "^[0-9]\+.*respawn:/sbin/mingetty" This will pull out ensure that all lines extracted will begin with at lest one digit. Version-Release number of selected component (if applicable): initscripts-7.14-1 How reproducible: Consistent 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:
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.