Re: [systemd-devel] [PATCH] units: add ConditionKernelCommandLine=resume
On Tue, 17.02.15 01:33, Cristian Rodríguez (crrodrig...@opensuse.org) wrote: If there is no resume= ..it is not possible to hubrid-sleep or hibernate To my knowledge the resume device can be discovered in different ways than just the kernel cmdline. On my machine here there is no resume= on the kernel cmdline, and hibernation works anyway. Also, even if: simply not running the sleep service, and skipping over it sounds like the wrong approach. It would just turn hibernation into a NOP, but it should properly fail. If this was really an issue, then the right fix would be to change can_sleep() in src/shared/sleep-config.c, to detect this properly. --- units/systemd-hibernate.service.in| 1 + units/systemd-hybrid-sleep.service.in | 1 + 2 files changed, 2 insertions(+) diff --git a/units/systemd-hibernate.service.in b/units/systemd-hibernate.service.in index 29d9b69..2a21cfc 100644 --- a/units/systemd-hibernate.service.in +++ b/units/systemd-hibernate.service.in @@ -11,6 +11,7 @@ Documentation=man:systemd-suspend.service(8) DefaultDependencies=no Requires=sleep.target After=sleep.target +ConditionKernelCommandLine=resume [Service] Type=oneshot diff --git a/units/systemd-hybrid-sleep.service.in b/units/systemd-hybrid-sleep.service.in index 914b686..b3039a0 100644 --- a/units/systemd-hybrid-sleep.service.in +++ b/units/systemd-hybrid-sleep.service.in @@ -11,6 +11,7 @@ Documentation=man:systemd-suspend.service(8) DefaultDependencies=no Requires=sleep.target After=sleep.target +ConditionKernelCommandLine=resume [Service] Type=oneshot -- 2.2.2 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] units: add ConditionKernelCommandLine=resume
В Tue, 17 Feb 2015 01:33:41 -0300 Cristian Rodríguez crrodrig...@opensuse.org пишет: If there is no resume= ..it is not possible to hubrid-sleep or hibernate Why? (default) resume device can be specified directly in initrd. --- units/systemd-hibernate.service.in| 1 + units/systemd-hybrid-sleep.service.in | 1 + 2 files changed, 2 insertions(+) diff --git a/units/systemd-hibernate.service.in b/units/systemd-hibernate.service.in index 29d9b69..2a21cfc 100644 --- a/units/systemd-hibernate.service.in +++ b/units/systemd-hibernate.service.in @@ -11,6 +11,7 @@ Documentation=man:systemd-suspend.service(8) DefaultDependencies=no Requires=sleep.target After=sleep.target +ConditionKernelCommandLine=resume [Service] Type=oneshot diff --git a/units/systemd-hybrid-sleep.service.in b/units/systemd-hybrid-sleep.service.in index 914b686..b3039a0 100644 --- a/units/systemd-hybrid-sleep.service.in +++ b/units/systemd-hybrid-sleep.service.in @@ -11,6 +11,7 @@ Documentation=man:systemd-suspend.service(8) DefaultDependencies=no Requires=sleep.target After=sleep.target +ConditionKernelCommandLine=resume [Service] Type=oneshot ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH] units: add ConditionKernelCommandLine=resume
If there is no resume= ..it is not possible to hubrid-sleep or hibernate --- units/systemd-hibernate.service.in| 1 + units/systemd-hybrid-sleep.service.in | 1 + 2 files changed, 2 insertions(+) diff --git a/units/systemd-hibernate.service.in b/units/systemd-hibernate.service.in index 29d9b69..2a21cfc 100644 --- a/units/systemd-hibernate.service.in +++ b/units/systemd-hibernate.service.in @@ -11,6 +11,7 @@ Documentation=man:systemd-suspend.service(8) DefaultDependencies=no Requires=sleep.target After=sleep.target +ConditionKernelCommandLine=resume [Service] Type=oneshot diff --git a/units/systemd-hybrid-sleep.service.in b/units/systemd-hybrid-sleep.service.in index 914b686..b3039a0 100644 --- a/units/systemd-hybrid-sleep.service.in +++ b/units/systemd-hybrid-sleep.service.in @@ -11,6 +11,7 @@ Documentation=man:systemd-suspend.service(8) DefaultDependencies=no Requires=sleep.target After=sleep.target +ConditionKernelCommandLine=resume [Service] Type=oneshot -- 2.2.2 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel