[systemd-devel] On(Resume|suspend|hibernate) in unit files?

Colin Guthrie gmane at colin.guthr.ie
Thu Feb 28 07:55:46 PST 2013

'Twas brillig, and Lennart Poettering at 28/02/13 12:37 did gyre and gimble:
> On Wed, 27.02.13 22:22, Cristian Rodríguez (crrodriguez at opensuse.org) wrote:
>> Hi:
>> There is buggy, legacy software around which simply does not behave
>> properly when faced with resume/suspend/hibernate which is not
>> always practical to modify or fix.
>> Is there any way to have something like
>> ReloadOnResume=[true|false]
>> StopOnSuspend=[true|false]
>> Or some other mechanism provided by systemd/logind that does not
>> require to use the ugly /usr/lib/systemd/system-sleep/ hooks ?
> My recommendation would be to fix the software in question. I mean, we
> will provide compatibility with older software, but we are very
> conservative on adding hacky work-arounds for broken software,
> especially if no such hack existed in the solutions that were used
> before systemd.

FWIW, while I'm in total agreement with what you say and the resolution,
the pm-utils hooks are what was used before systemd so there technical
was such a hack that existed in the solutions that were used before systemd.

I remember seeing various hooks here to e.g. shut down mysql and restart
it again and such like things. That particular example hasn't been
needed for me for ages, but I'm sure there are other examples that might
be more legitimate.

That said, I think Fred had patches that are applied in Suse to read
these pm-utils hooks anyway, so that might be what Cristian needs?



Colin Guthrie

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/

More information about the systemd-devel mailing list