Improve afm-user-session setup
authorJosé Bollo <jose.bollo@iot.bzh>
Fri, 24 Nov 2017 08:33:43 +0000 (09:33 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Fri, 24 Nov 2017 16:44:58 +0000 (17:44 +0100)
Change-Id: I4dfb0939afc871e93874cf021548db2e85d3656c
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
conf/system/afm-user-session@.service
conf/system/afm-user-setup@.service

index 83ae24f..fae3e46 100644 (file)
@@ -1,15 +1,11 @@
 [Unit]
 Description=Initiate afm-user-session %i
 [Unit]
 Description=Initiate afm-user-session %i
+Requires=systemd-user-sessions.service
 After=systemd-user-sessions.service
 After=systemd-user-sessions.service
-Wants=afm-user-setup@%i.service
-Before=afm-user-setup@%i.service
-Wants=afm-user-session@%i.target
+Requires=afm-user-session@%i.target
 Before=afm-user-session@%i.target
 [Service]
 PAMName=afm-user-session
 User=%i
 Type=simple
 Before=afm-user-session@%i.target
 [Service]
 PAMName=afm-user-session
 User=%i
 Type=simple
-ExecStartPre=/bin/echo START afm-user-session@%i
 ExecStart=/bin/sleep 2147483648
 ExecStart=/bin/sleep 2147483648
-ExecStop=/bin/echo STOP afm-user-session@%i
-RemainAfterExit=yes
index 050a33a..5d99d2d 100644 (file)
@@ -4,10 +4,8 @@ Requires=afm-user-setup@%i.path
 After=afm-user-setup@%i.path
 Requires=afm-user-session@%i.service
 After=afm-user-session@%i.service
 After=afm-user-setup@%i.path
 Requires=afm-user-session@%i.service
 After=afm-user-session@%i.service
-Before=afm-user-session@%i.target
 [Service]
 [Service]
-User=%i
 Type=oneshot
 Type=oneshot
-ExecStart=/bin/rm /run/user/%i/afm-user-started
+ExecStart=/bin/echo Complete setup of afm-user-session %i