Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 127938 - hibernate-cleanup script and raid arrays
Summary: hibernate-cleanup script and raid arrays
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-28 20:22 UTC by Jonathan Melville
Modified: 2006-04-14 05:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Melville 2006-03-28 20:22:09 UTC
hibernate-script; in /etc/init.d/hibernate-cleanup the function 

get_swap_id() {
        local line
        fdisk -l | while read line; do
                case "$line" in
                        /*Linux\ [sS]wap*) echo "${line%% *}"
                esac
        done
}

When fdisk is called to list partitions containing raid volumes then returns an error. 

Eg: Disk /dev/md0 doesn't contain a valid partition table. On my system is a minor cosmetic issue, but could potentially cause issues.
The fix is to rediredt sterr to stout and let the error be filtered out...

get_swap_id() {
        local line
-        fdisk -l | while read line; do
+        fdisk -l 2>&1 | while read line; do
                case "$line" in
                        /*Linux\ [sS]wap*) echo "${line%% *}"
                esac
        done
}
Comment 1 Henrik Brix Andersen 2006-04-14 05:09:16 UTC
I have asked upstream to include this in their next version, which should be out soonish.