Bug 97848

Summary: [PATCH] Allow non-bash shells
Product: pm-utils Reporter: Mihail Konev <k.mvc>
Component: GeneralAssignee: Richard Hughes <richard>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: The proposed patch

Description Mihail Konev 2016-09-18 13:03:54 UTC
Created attachment 126601 [details] [review]
The proposed patch

Pm-suspend would not function with /bin/sh pointing to /bin/dash.
(The machine just stays awake).

There would always be a:

  <date>: performing suspend
  sh: echo: I/O error
  <date>: Awake

in /var/log/pm-suspend.log

Trough editing /usr/lib64/pm-utils/pm-functions, it was learnt that do_suspend() performs an 'echo -n "mem" >/sys/power/state'.

The
  dash -c "echo mem >/sys/power/state"
however, results in system being suspended.

So the fix is not to pass an "-n" to echo.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.