Hi Ivo,

I see that you uploaded a fix for #744753, using a unit file called
anacron-resume:

> [Unit]
> Description=Run anacron jobs at resume
> After=suspend.target
> After=hibernate.target
> After=hybrid-sleep.target
> 
> [Service]
> ExecStart=/bin/systemctl --no-block --fail start anacron.service
> 
> [Install]
> WantedBy=suspend.target
> WantedBy=hibernate.target
> WantedBy=hybrid-sleep.target


I don't think, this fixes the issue in a proper way, because ordering
that service "After=suspend.target", doesn't mean the unit is actually
run on resume.

Take a look at systemd-suspend.service, which is responsible for putting
the system to sleep:

> [Unit]
> Description=Suspend
> Documentation=man:systemd-suspend.service(8)
> DefaultDependencies=no
> Requires=sleep.target
> After=sleep.target
> 
> [Service]
> Type=oneshot
> ExecStart=/lib/systemd/systemd-sleep suspend


It *also* has After=sleep.target.

That means, depending on the timing, anacron-resume.service might be
triggered just before suspend not on resume, and it's not guaranteed
that anacron has finished before systemd-sleep is called.

I don't think the patch was intended this way?

Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to