mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 09:21:26 +03:00
64a36ae4b1
and the same for hibernate.target and hybrid-sleep.target. Tested with both sucessful and unsuccessful suspends. The result of the start job was correct in both cases. Closes #6419 (a regression in v233 and v234). > suspend is unsual for a target, because it has to stop itself once it's > started. Otherwise you couldn't start it again, so you could only suspend > once! Currently that's implemented using BindsTo=systemd-sleep.service. > Meaning it pulls in systemd-sleep.service to do the actual suspend, and > then de-activates afterwards. But the behaviour of BindsTo was changed > recently (not without some issues during development) - maybe this bug > is caused by poettering/systemd@631b676 which I think was added in > release v233. > > sleep.target (see man systemd.special) has the same need, but it > implements it differently. It simply has StopWhenUnneeded=yes. This commit switches suspend.target etc. to the approach used by sleep.target.
15 lines
490 B
SYSTEMD
15 lines
490 B
SYSTEMD
# This file is part of systemd.
|
|
#
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
[Unit]
|
|
Description=Hybrid Suspend+Hibernate
|
|
Documentation=man:systemd.special(7)
|
|
DefaultDependencies=no
|
|
Requires=systemd-hybrid-sleep.service
|
|
After=systemd-hybrid-sleep.service
|
|
StopWhenUnneeded=yes
|