Avoid implicit Before socket.target
authorJosé Bollo <jose.bollo@iot.bzh>
Thu, 23 Nov 2017 21:52:46 +0000 (22:52 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Fri, 24 Nov 2017 16:44:58 +0000 (17:44 +0100)
Change-Id: I493c49a80ebb1fa85f586d0b0704b5682f0c3613
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
conf/unit/afm-unit-debug.conf.in
conf/unit/afm-unit.conf.in
conf/unit/generate-unit-conf/provided.inc
conf/unit/generate-unit-conf/service.inc

index fdea673..d7fa47d 100644 (file)
@@ -118,6 +118,12 @@ BindsTo=afm-api-ws-{{name}}@%i.socket
 After=afm-api-ws-{{name}}@%i.socket
 {{/value=auto|ws}}
 {{/required-api}}
 After=afm-api-ws-{{name}}@%i.socket
 {{/value=auto|ws}}
 {{/required-api}}
+{{#provided-api}}
+{{#value=ws|auto}}
+Requires=afm-api-ws-{{name}}@%i.socket
+After=afm-api-ws-{{name}}@%i.socket
+{{/value=ws|auto}}
+{{/provided-api}}
 %nl
 [Service]
 EnvironmentFile=-@afm_confdir@/unit.env.d/*
 %nl
 [Service]
 EnvironmentFile=-@afm_confdir@/unit.env.d/*
@@ -208,6 +214,7 @@ WantedBy=afm-user-session@.target
 Description=Provides api {{name}} for user %i
 Requires=afm-user-setup@%i.service
 After=afm-user-setup@%i.service
 Description=Provides api {{name}} for user %i
 Requires=afm-user-setup@%i.service
 After=afm-user-setup@%i.service
+DefaultDependencies=no
 [Socket]
 SmackLabel=*
 ListenStream=/run/user/%i/apis/ws/{{name}}
 [Socket]
 SmackLabel=*
 ListenStream=/run/user/%i/apis/ws/{{name}}
index 56a9075..bf9b32a 100644 (file)
@@ -118,6 +118,12 @@ BindsTo=afm-api-ws-{{name}}@%i.socket
 After=afm-api-ws-{{name}}@%i.socket
 {{/value=auto|ws}}
 {{/required-api}}
 After=afm-api-ws-{{name}}@%i.socket
 {{/value=auto|ws}}
 {{/required-api}}
+{{#provided-api}}
+{{#value=ws|auto}}
+Requires=afm-api-ws-{{name}}@%i.socket
+After=afm-api-ws-{{name}}@%i.socket
+{{/value=ws|auto}}
+{{/provided-api}}
 %nl
 [Service]
 EnvironmentFile=-@afm_confdir@/unit.env.d/*
 %nl
 [Service]
 EnvironmentFile=-@afm_confdir@/unit.env.d/*
@@ -208,6 +214,7 @@ WantedBy=afm-user-session@.target
 Description=Provides api {{name}} for user %i
 Requires=afm-user-setup@%i.service
 After=afm-user-setup@%i.service
 Description=Provides api {{name}} for user %i
 Requires=afm-user-setup@%i.service
 After=afm-user-setup@%i.service
+DefaultDependencies=no
 [Socket]
 SmackLabel=*
 ListenStream=/run/user/%i/apis/ws/{{name}}
 [Socket]
 SmackLabel=*
 ListenStream=/run/user/%i/apis/ws/{{name}}
index fd5d3ec..4f96426 100644 (file)
@@ -16,6 +16,7 @@ dnl vim: set filetype=sysctl.conf.m4 syntax=sysctl.conf.m4:
 Description=Provides api {{name}} for user %i
 Requires=afm-user-setup@%i.service
 After=afm-user-setup@%i.service
 Description=Provides api {{name}} for user %i
 Requires=afm-user-setup@%i.service
 After=afm-user-setup@%i.service
+DefaultDependencies=no
 
 [Socket]
 SmackLabel=*
 
 [Socket]
 SmackLabel=*
index 273db3b..2ff1de7 100644 (file)
@@ -47,6 +47,13 @@ BindsTo=UNIT_NAME_SOCKET_FOR({{name}})
 After=UNIT_NAME_SOCKET_FOR({{name}})
 {{/value=auto|ws}}
 {{/required-api}}
 After=UNIT_NAME_SOCKET_FOR({{name}})
 {{/value=auto|ws}}
 {{/required-api}}
+{{#provided-api}}
+{{#value=ws|auto}}
+Requires=UNIT_NAME_SOCKET_FOR({{name}})
+After=UNIT_NAME_SOCKET_FOR({{name}})
+{{/value=ws|auto}}
+{{/provided-api}}
+
 %nl
 
 [Service]
 %nl
 
 [Service]