Bug 103530
Summary: | /etc/rc.d/rc.sysinit is ineffectual/incorrect for headless machines - PROMPT setting in /etc/sysconfig/autofsck not honored correctly | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Shamim Islam <shamim> |
Component: | initscripts | Assignee: | Bill Nottingham <notting> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Brock Organ <borgan> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 9 | CC: | rvokal |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | N/A | ||
Whiteboard: | |||
Fixed In Version: | FC4 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-09-30 19:23:02 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: | |||
Attachments: |
Description
Shamim Islam
2003-09-01 23:25:39 UTC
Feel free to attach the patch. Note that you can set options for fsck in /fsckoptions to have it never prompt. Actually, on trivial errors on the root filesystem the /fsckoptions (just like the /etc/sysconfig/autofsck options) are ignored. Created attachment 94129 [details]
Corrected fsck behavior - streamlines fsck handling code
I did not run diff -bnuR on the old version of rc.sysinit, since I suspect that
there will be other minor variations between distros.
What you will notice is that there are packaged functions for handling the fsck
behavior and that if the prompting is declined, it correctly NEVER EVER stops
unless something incredibly serious happens.
Also, if you do a diff, you will see references to -gt for return codes from
fsck - this is where part of the problem originates. Fsck returns a bitfield.
Enjoy. I am attempting to desseminate this fix as far as it will go.
P.S. the /etc/nologin is an additional fix that corrects for when a powerfail
shutdown is terminated before completion.
You have no idea how many times I have had to hook up a monitor and keyboard to
my headless firewall even after setting the PROMPT value.
Hope this is helpful. :)
Can I be listed as a contributor???? :) :) :)
Comment in AskForKey is reversed - returns 0 on no keypress, returns 1 on keypress. :) Correction - AskForKey comment is correct. Returns 0 if key is pressed within timeout Returns 1 if key is not pressed within timeout Sorry - I got confused for a second - even though I commented it right the first time. When used in if statement, zero return code processes the then portion, and non-zero processes the else portion. :) The return code processing vs the [] evaluation had me mixed up for a moment. Created attachment 94303 [details]
Corrects fsck behavior for headless machines, and streamlines code
Modified the Reboot() function slightly so the logic is more obvious.
Created attachment 94304 [details]
Corrects fsck behavior for headless machines, and streamlines code
Extraneous CTRL-M injection detected in last upload - removed.
Closing bugs on older, no longer supported, releases. Apologies for any lack of response. This code was reworked before FC4. Notably, fsck is now only run once, and the error code for 'reboot now' is properly handled. Please open new issues for further problems with the fsck code - thanks! |