If we modify log() to make it return the previous error code, the
following code are affected:

sleep.d/75modules
* resume_modules() calls modreload(), if it fails to load a module, the return 
value of sleep.d/75modules will match the return value of modprobe (is this the 
expected behavior, or should resume_modules return 0 just like suspend_modules? 
I vote for the latter one)

pm-functions
* load_hook_blacklist(): if disablehook() fails to write to 
${STORAGEDIR}/disable_hook:HOOKNAME, the return value of load_hook_blacklist 
will be the return value of disablehook()  (this is unlikely to happen, but 
should load_hook_)
* _run_hook: this function will work as expected as the return value of hook_ok 
propagates to hook_exit_status

Other functions/ scripts are not affected by this change in log() .
Should log() change the previous exitcode or not?

The patch provided does not change the behavior of pm-utils, other than
making _run_hook() work as it should do.

** Patch added: "Pass the right return value to hook_exit_status"
   
https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/665651/+attachment/1883466/+files/run-hook-in-pm-functions.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/665651

Title:
  pm-utils does not follow requests to inhibit suspend/hibernate from
  scripts in /etc/pm/sleep.d

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to