From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050720 Fedora/1.0.6-1.1.fc4 Firefox/1.0.6 Description of problem: The script /etc/rc.d/init.d/readahead checks to see if there is at least 384M of RAM before running. The logic is reversed, so it runs if there is LESS THAN 384M of RAM. Version-Release number of selected component (if applicable): readahead-1.1-1.14 How reproducible: Always Steps to Reproduce: 1. Do "service readahead start" on a box with 1G of RAM. 2. Watch it not start or do anything. Actual Results: readahead did not run Expected Results: readahead should have run Additional info: The line free -m | awk '/Mem:/ {exit ($2 < 384)?0:1}' || exit 0 is incorrect. If total RAM < 384, the awk returns 0, so readahead runs If total RAM >= 384, the awk returns 1, so the exit runs Please be kind if I have this backwards.
looks ok to me. committed, and built for next errata. Bill, want to double check that logic ? as I think it was you that created this script ?
Yeah, looks right.
Did nobody notice that this package didn't work? I mean, completely and utterly failed to do what it was created to do? If so, how did this happen?
beats me. I guess the fact that it always printed [ OK ] worked as a placebo even when it didn't actually do anything. I'm as surprised as the next guy that it took this long for someone to notice. I recall seeing timings of the new code vs the old code at some point, I guess the script got subsequently changed, and not retested.
readahead_early still has the same problem.
Created attachment 117432 [details] Suggested improvements Here's a patch containing the fix and some while-at-it-improvements for review: - readahead_early looks useful in more runlevels than just 5. - Sync versioned gcc, firefox and openoffice.org dirs with FC4 updates.
argh. Thanks Ville, I've merged these into CVS for FC4/rawhide. I'll do another errata soon.