Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 293778 - sys-power/hibernate-script-2.0-r1 sources common.conf multiple times if uswsusp is not installed
Summary: sys-power/hibernate-script-2.0-r1 sources common.conf multiple times if uswsu...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Krzysztof Pawlik (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-19 22:30 UTC by Kartik Subramanian
Modified: 2009-12-12 13:02 UTC (History)
1 user (show)

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 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.