Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 99373 - error messages on shutdown when /proc/swaps is not enabled...
error messages on shutdown when /proc/swaps is not enabled...
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2003-07-18 05:46 EDT by Daniel J Blueman
Modified: 2014-03-16 22:37 EDT (History)
1 user (show)

See Also:
Fixed In Version: 7.31-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-09-03 19:35:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel J Blueman 2003-07-18 05:46:07 EDT
In the linux-2.6.0 test series, when swapping is not explicitly enabled, the 
user sees an error message from awk, as it cannot open /proc/swaps

The code in /etc/rc.d/init.d/halt goes:

# Turn off swap, then unmount file systems.
SWAPS=`awk '! /^Filename/ { print $1 }' /proc/swaps`
[ -n "$SWAPS" ] && runcmd $"Turning off swap: " swapoff $SWAPS

This is fixed by:

[ -f /proc/swaps ] && SWAPS=`awk '! /^Filename/ { print $1 }' /proc/swaps`

And so, is a very cheap fix.
Comment 1 Bill Nottingham 2003-09-03 19:35:59 EDT
Added, will be  in 7.31-1; thanks!

Note You need to log in before you can comment on or make changes to this bug.