aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2020-11-30 19:25:53 -0500
committerScott Murray <scott.murray@konsulko.com>2020-12-02 01:35:43 +0000
commitdc8a1974e4e4a8cff36a13515c9441e4809d23ea (patch)
tree14be48dd67c1b07ca79f0933ef06030077f436ca
parent5a9325a2c642e85d90f3bd98a49dbc16df4747ec (diff)
Add network and bluetooth permissions to service template
Add new public:network and public:bluetooth permissions that currently drive adding dependencies on network.target and bluetooth.target, respectively. This allows related bindings to depend on those to avoid start up races. In the future, these permissions could perhaps be tied to configuring DBus access control of the related services. Bug-AGL: SPEC-3509 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I582691bfe223a01ce80f04a4b0a1463d58287a9c (cherry picked from commit 0a24bbdab25e792b5abe2f3708aceb5a9b3a5e42)
-rw-r--r--conf/unit/service.inc12
1 files changed, 10 insertions, 2 deletions
diff --git a/conf/unit/service.inc b/conf/unit/service.inc
index ea08220..dcc576b 100644
--- a/conf/unit/service.inc
+++ b/conf/unit/service.inc
@@ -46,13 +46,21 @@ Requires=afm-user-session@%i.target
After=user@%i.service
ENDIF
-After=Network.target
-
IF_PERM(:public:display)
BindsTo=weston@display.service
After=weston@display.service
ENDIF
+IF_PERM(:public:bluetooth)
+Wants=bluetooth.target
+After=bluetooth.target
+ENDIF
+
+IF_PERM(:public:network)
+Wants=network.target
+After=network.target
+ENDIF
+
# Adds check to smack
ConditionSecurity=smack
%nl