Re: [systemd-devel] Waiting on a bus name to appear in systemd service

2018-06-30 Thread Ryan Gonzalez
Have you tried just connecting like I said before? systemd's D-Bus activation will make sure whichever polkit service is started once you try to connect to it. This is really the way you should handle it. That being said, for future reference, to start a potentially nonexistent service first,

Re: [systemd-devel] Waiting on a bus name to appear in systemd service

2018-06-30 Thread Federico Di Pierro
Hi Ryan, thanks for your answer! The issue is that some old distributions (ubuntu 16.04) had polkitd.service, while new ones have polkit.service. How can I specify a "Requires=" on both? Obviously one of them will fail depending on system, thus my own service will fail too. Thank you very much,

Re: [systemd-devel] Waiting on a bus name to appear in systemd service

2018-06-29 Thread Ryan Gonzalez
systemd can depend on services, not bus names. In your example, you'd want: Wants=polkit However, in most cases, you don't actually want to do this; if the service (in this case, polkit) tells systemd what bus name it is going to ask for, systemd will automatically wait when your service asks

[systemd-devel] Waiting on a bus name to appear in systemd service

2018-06-29 Thread Federico Di Pierro
Hi everyone! I was wondering whether there was a way for a systemd service to wait for a bus name to appear before starting a service. Something like: Requires=org.freedesktop.PolicyKit1 I could not find much googling around. Is this possible? Thanks everyone! Federico