Bug 472717
| Summary: | /etc/event.d/rcS doesn't ignore comments in /etc/inittab -- buggy awk script | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | D. Wagner <daw-redhatbugzilla> |
| Component: | initscripts | Assignee: | Bill Nottingham <notting> |
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 9 | CC: | notting, rvokal |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| URL: | https://bugzilla.redhat.com/show_bug.cgi?id=447216#c6 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2008-11-24 19:15:49 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
*** This bug has been marked as a duplicate of bug 447216 *** |
Description of problem: It looks like /etc/event.d/rcS doesn't reliably ignore comments in /etc/inittab. In particular, if I understand correctly, /etc/event.d/rcS is looking for lines of the form *:*:initdefault:*, where the first two *'s represent arbitrary strings (except that they must not contain a :) and the third * represents an arbitrary string. As a result if /etc/inittab contains # id:3:initdefault: id:5:initdefault: will be interpreted by /etc/event.d/rcS as two valid lines -- it does not ignore the comment. Here, watch: $ /bin/awk -F ':' '$3 == "initdefault" { print $2 }' << EOF heredoc> # id:3:initdefault: heredoc> id:5:initdefault: heredoc> EOF 3 5 This is a gotcha that got me when I edited my /etc/inittab by commenting out the line that was previously present and adding a new (non-comment) line; the old commented-out line continued to take effect. See here for more explanation: https://bugzilla.redhat.com/show_bug.cgi?id=447216#c6 I'm opening a new bug report so that this bug isn't missed. Version-Release number of selected component (if applicable): initscripts-8.76.4-1.x86_64