Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 293778

Summary: sys-power/hibernate-script-2.0-r1 sources common.conf multiple times if uswsusp is not installed
Product: Gentoo Linux Reporter: Kartik Subramanian <selfification>
Component: [OLD] Core systemAssignee: Krzysztof Pawlik (RETIRED) <nelchael>
Status: RESOLVED UPSTREAM    
Severity: minor CC: mobile+disabled
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Kartik Subramanian 2009-11-19 22:30:32 UTC
Note that each time a "TryMethod" is attempted, common.conf is sourced.  This can be quickly checked by adding an "echo Hi" to the suspend/restore methods in one of the scriptlets in /usr/share/hibernate/scriptlets.d/

It repeats twice when running hibernate-ram.  This is because ram.conf tries ususpend-ram.conf (which my system does not have) and then sysfs-ram.conf.  Both of these include common.conf.

A work around is to comment out the extraneous "TryMethod"s in my system.  A correct solution would be to refactor the inclusion of common.conf (amongst all the different hibernate.conf ram.conf disk.conf) or to use some sort of C style include guard.

Package maintainer, please fix or follow up with upstream on the neatest fix.

Reproducible: Always

Steps to Reproduce:
1. Add an echo to an scriptlet in the restore function
2. hibernate-ram

Actual Results:  
The echo is printed multiple times -- 2 times for hibernate-ram.

Expected Results:  
The echo should be printed out once.
Comment 1 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-12-12 13:02:42 UTC
TuxOnIce has its own bugzilla, please report this issue upstream.