diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-05-05 02:06:58 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-05-08 13:54:23 +0200 |
commit | 6edd7d0a09171ea5ae8e01b7b1cbcb0bdfbfeb16 (patch) | |
tree | 85a09e06fd5dfc98cb198fafb9a33b70e79a4c63 /units | |
parent | logind: use "sleep" as generic term for "suspend", "hibernate", and later on ... (diff) | |
download | systemd-6edd7d0a09171ea5ae8e01b7b1cbcb0bdfbfeb16.tar.xz systemd-6edd7d0a09171ea5ae8e01b7b1cbcb0bdfbfeb16.zip |
sleep: implement suspend/hibernate as first class targets
Diffstat (limited to 'units')
-rw-r--r-- | units/.gitignore | 2 | ||||
-rw-r--r-- | units/hibernate.service.in | 16 | ||||
-rw-r--r-- | units/hibernate.target | 14 | ||||
-rw-r--r-- | units/sleep.target | 13 | ||||
-rw-r--r-- | units/suspend.service.in | 16 | ||||
-rw-r--r-- | units/suspend.target | 14 |
6 files changed, 75 insertions, 0 deletions
diff --git a/units/.gitignore b/units/.gitignore index 68c174f1f5..dc5e1d47d3 100644 --- a/units/.gitignore +++ b/units/.gitignore @@ -1,3 +1,5 @@ +/hibernate.service +/suspend.service /console-getty.service /systemd-journald.service user@.service diff --git a/units/hibernate.service.in b/units/hibernate.service.in new file mode 100644 index 0000000000..6dba653d37 --- /dev/null +++ b/units/hibernate.service.in @@ -0,0 +1,16 @@ +# 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=Hibernate +DefaultDependencies=no +Requires=sleep.target +After=sleep.target + +[Service] +Type=oneshot +ExecStart=@rootlibexecdir@/systemd-sleep hibernate diff --git a/units/hibernate.target b/units/hibernate.target new file mode 100644 index 0000000000..05238a7cbf --- /dev/null +++ b/units/hibernate.target @@ -0,0 +1,14 @@ +# 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. + +# See systemd.special(7) for details + +[Unit] +Description=Hibernate +DefaultDependencies=no +BindTo=hibernate.service +After=hibernate.service diff --git a/units/sleep.target b/units/sleep.target new file mode 100644 index 0000000000..9f4b247eb5 --- /dev/null +++ b/units/sleep.target @@ -0,0 +1,13 @@ +# 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. + +# See systemd.special(7) for details + +[Unit] +Description=Sleep +DefaultDependencies=no +RefuseManualStart=yes diff --git a/units/suspend.service.in b/units/suspend.service.in new file mode 100644 index 0000000000..3cf819e476 --- /dev/null +++ b/units/suspend.service.in @@ -0,0 +1,16 @@ +# 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=Suspend +DefaultDependencies=no +Requires=sleep.target +After=sleep.target + +[Service] +Type=oneshot +ExecStart=@rootlibexecdir@/systemd-sleep suspend diff --git a/units/suspend.target b/units/suspend.target new file mode 100644 index 0000000000..3ddb44975d --- /dev/null +++ b/units/suspend.target @@ -0,0 +1,14 @@ +# 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. + +# See systemd.special(7) for details + +[Unit] +Description=Suspend +DefaultDependencies=no +BindTo=suspend.service +After=suspend.service |