Bug 99373 - error messages on shutdown when /proc/swaps is not enabled...
Summary: error messages on shutdown when /proc/swaps is not enabled...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-07-18 09:46 UTC by Daniel J Blueman
Modified: 2014-03-17 02:37 UTC (History)
1 user (show)

Fixed In Version: 7.31-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-09-03 23:35:59 UTC
Embargoed:


Attachments (Terms of Use)

Description Daniel J Blueman 2003-07-18 09:46:07 UTC
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 23:35:59 UTC
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.