fix /etc/xdg/autostart vs systemd race condition

Information

ID: 424
PHID: PHID-TASK-xsqvcnluesqlbbx7bad6
Author: Patrick
Status at Migration Time: open
Priority at Migration Time: Normal

Description

TLDR:

How to have a /etc/xdg/autostart/app.desktop service wait for a systemd service?

Long:

qubes-whonix-firewall.service runs enable-firewall and conditionally creates the /var/run/qubes-service/whonix-secure-proxy status file.

/etc/xdg/autostart/qubes-whonixsetup.desktop runs /usr/lib/qubes-whonix/qubes-whonixsetup. Sometimes /etc/xdg/autostart/qubes-whonixsetup.desktop runs faster than qubes-whonix-firewall.service. The status file does not exist at that point, which results in an “This TemplateVM needs a Whonix-Gateway NetVM” error popup.

I would like to avoid some sleep/wait/custom code if there is an existing tool for such purposes.


References:


A systemd --user instance knows nothing about the systemd --system instance. I.e. a systemd --user instance cannot reference After=some-system.service. Source:

https://lists.freedesktop.org/archives/systemd-devel/2017-February/038361.html

So we cannot use qubes-whonixsetup.service After=qubes-gui-agent.service.

systemd feature request - systemd --user instance ability to reference systemd --system services with After= etc.:

Comments


Patrick

2015-11-05 16:57:18 UTC


marmarek

2015-11-05 18:43:04 UTC


Patrick

2015-11-05 19:01:37 UTC


Patrick

2015-11-05 19:05:07 UTC


Patrick

2015-11-12 13:32:50 UTC


Patrick

2016-04-05 15:41:09 UTC


HulaHoop

2016-04-05 23:16:23 UTC


Patrick

2016-04-06 01:04:02 UTC


Patrick

2016-04-07 19:16:46 UTC


Patrick

2016-04-15 18:17:27 UTC


Patrick

2017-02-20 23:56:32 UTC


Patrick

2017-02-21 00:13:42 UTC


Patrick

2017-02-21 00:23:44 UTC


Patrick

2017-02-21 16:54:07 UTC


Patrick

2017-02-26 17:53:26 UTC


Patrick

2017-02-28 01:11:14 UTC


Patrick

2017-03-01 21:05:50 UTC