Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140512 - hibernate-script: false initscript startup failure on updated systems
Summary: hibernate-script: false initscript startup failure on updated systems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Christian Heim (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-15 09:41 UTC by Marek Szuba
Modified: 2006-07-15 13:16 UTC (History)
1 user (show)

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


Attachments
hibernate-script-1.93-fwreturn.patch (hibernate-script-1.93-fwreturn.patch,480 bytes, patch)
2006-07-15 09:42 UTC, Marek Szuba
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Szuba archtester gentoo-dev 2006-07-15 09:41:59 UTC
I'm not exactly sure what caused this to happen, but about two days ago the initscript from sys-power/hibernate-script (version 1.91, later on reproduced with 1.93) began to report a startup failure.

What happens was:
 - the first function in the start block checks swap partitions. This part works fine, invalidating my suspend images as it should;
 - the second function in the block checks for images stored in files. There is a special file which must exist if there is such an image present and the block does a "[ -f file ] || return" to check for it. I don't use image files, so it returns here; however, although as far as I can say the script itself hasn't changed for quite a while, on my up-to-date system the aforementioned test line sets the return value to 1.
 - the final line of the script is the Gentoo-specific "eend $?', which sees the 1 from above and throws an error.

It is quite easy to see the problem is caused by passing an inherited return value from the second function instead of signalling "nothing to do here, but everything is fine". The upstream initscript could get away with this because it doesn't check the return value, but in our case it definitely should be controlled. The attached patch forces the function to return zero if this test fails.
Comment 1 Marek Szuba archtester gentoo-dev 2006-07-15 09:42:33 UTC
Created attachment 91793 [details, diff]
hibernate-script-1.93-fwreturn.patch
Comment 2 Christian Heim (RETIRED) gentoo-dev 2006-07-15 13:16:26 UTC
Fixed in CVS! Thanks a lot. Please reopen the bugs, if you're still having this issues.