[systemd-devel] [RFC] [PATCH 2/3] resume: add a tool to write a device node's major:minor to /sys/power/resume.

Andrei Borzenkov arvidjaar at gmail.com
Sat Aug 23 07:19:41 PDT 2014


В Sat, 23 Aug 2014 16:47:53 +0400
Ivan Shapovalov <intelfx100 at gmail.com> пишет:

> diff --git a/units/systemd-resume at .service.in b/units/systemd-resume at .service.in
> new file mode 100644
> index 0000000..f760f16
> --- /dev/null
> +++ b/units/systemd-resume at .service.in
> @@ -0,0 +1,23 @@
> +#  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=Resume from hibernation using device %f
> +Documentation=man:systemd-resume at .service(8)
> +DefaultDependencies=no
> +Conflicts=shutdown.target
> +BindsTo=%i.device
> +Wants=local-fs-pre.target
> +After=%i.device systemd-udevd.service
> +Before=local-fs-pre.target systemd-remount-fs.service systemd-fsck-root.service usr.mount shutdown.target
> +ConditionPathIsReadWrite=|!/
> +ConditionPathExists=|/etc/initrd-release
> +
> +[Service]
> +Type=oneshot
> +RemainAfterExit=yes

Actually that's interesting. As it stands now, it will be impossible to
get information whether resume actually happened from service status.
It will always reflect the very first invocation, when no resume image
was still present.

To this extent using RemainAfterExit is probably misleading here. There
is no persistent information that's worth keeping.

> +ExecStart=@rootlibexecdir@/systemd-resume %f



More information about the systemd-devel mailing list