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.