Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 140512
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Christian Heim (RETIRED) <phreak@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Marek Szuba <Marek.Szuba@if.pw.edu.pl>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
hibernate-script-1.93-fwreturn.patch hibernate-script-1.93-fwreturn.patch patch Marek Szuba 2006-07-15 09:42 0000 480 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 140512 depends on: Show dependency tree
Bug 140512 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-07-15 09:41 0000
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 From Marek Szuba 2006-07-15 09:42:33 0000 -------
Created an attachment (id=91793) [details]
hibernate-script-1.93-fwreturn.patch

------- Comment #2 From Christian Heim (RETIRED) 2006-07-15 13:16:26 0000 -------
Fixed in CVS! Thanks a lot. Please reopen the bugs, if you're still having this
issues.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug