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

Frederic Crozat fcrozat at suse.com
Thu Feb 28 08:51:11 PST 2013


Le jeudi 28 février 2013 à 15:55 +0000, Colin Guthrie a écrit :
> '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?

Well, the patch in question is even more ugly than that, since it defers
to pm-utils (when available) suspend / hibernate ;(

-- 
Frederic Crozat <fcrozat at suse.com>
SUSE



More information about the systemd-devel mailing list