summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2019-05-15 17:17:41 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2019-05-23 16:08:16 +0200
commit405ba312a11f4217e5a8742169b010e2c747a4e0 (patch)
treee6ea4b2f75bfbba69b68ffc532d27f582e172c1e
parentefabde7b7be19fbd35c886ad3dfd3431a24c5478 (diff)
afm-user-session: moves in libexec directory
Having the binary 'afm-user-session' in /usr/bin brings nothing. It is better to keep it in private area. Bug-AGL: SPEC-2367 Change-Id: I8ef517f599c02e18d8987278a6652a065ee6f0b6 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--conf/system/CMakeLists.txt3
-rw-r--r--conf/system/afm-api-afm-main@.service.in2
-rw-r--r--conf/system/afm-user-session@.service.in (renamed from conf/system/afm-user-session@.service)2
-rw-r--r--conf/user/afm-user-session.service10
-rw-r--r--src/CMakeLists.txt2
5 files changed, 5 insertions, 14 deletions
diff --git a/conf/system/CMakeLists.txt b/conf/system/CMakeLists.txt
index 4f77f93..eba8d42 100644
--- a/conf/system/CMakeLists.txt
+++ b/conf/system/CMakeLists.txt
@@ -23,6 +23,7 @@ configure_file(afm-system-daemon.socket.in afm-system-daemon.socket)
configure_file(afm-system-setup.service.in afm-system-setup.service)
configure_file(afm-system-setup.sh.in afm-system-setup.sh)
configure_file(afm-api-afm-main@.service.in afm-api-afm-main@.service)
+configure_file(afm-user-session@.service.in afm-user-session@.service)
configure_file(afm-user-setup@.service.in afm-user-setup@.service)
configure_file(afm-user-setup.sh.in afm-user-setup.sh)
@@ -39,7 +40,7 @@ if(NOT USE_SDK)
${CMAKE_CURRENT_BINARY_DIR}/afm-system-daemon.service
${CMAKE_CURRENT_BINARY_DIR}/afm-system-daemon.socket
${CMAKE_CURRENT_BINARY_DIR}/afm-system-setup.service
- ${CMAKE_CURRENT_SOURCE_DIR}/afm-user-session@.service
+ ${CMAKE_CURRENT_BINARY_DIR}/afm-user-session@.service
${CMAKE_CURRENT_SOURCE_DIR}/afm-user-session@.target
${CMAKE_CURRENT_BINARY_DIR}/afm-user-setup@.service
DESTINATION
diff --git a/conf/system/afm-api-afm-main@.service.in b/conf/system/afm-api-afm-main@.service.in
index f5b2519..4820cf2 100644
--- a/conf/system/afm-api-afm-main@.service.in
+++ b/conf/system/afm-api-afm-main@.service.in
@@ -10,4 +10,4 @@ After=afm-system-daemon.socket
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStart=/bin/ln -s @afm_platform_rundir@/apis/ws/afm-main /run/user/%i/apis/ws/afm-main
+ExecStart=/bin/ln -s @afm_platform_rundir@/apis/ws/afm-main @afm_users_rundir@/%i/apis/ws/afm-main
diff --git a/conf/system/afm-user-session@.service b/conf/system/afm-user-session@.service.in
index 93f9d86..aa214c6 100644
--- a/conf/system/afm-user-session@.service
+++ b/conf/system/afm-user-session@.service.in
@@ -5,4 +5,4 @@ After=systemd-user-sessions.service
[Service]
User=%i
PAMName=afm-user-session
-ExecStart=/usr/bin/afm-user-session
+ExecStart=@afm_libexecdir@/afm-user-session
diff --git a/conf/user/afm-user-session.service b/conf/user/afm-user-session.service
deleted file mode 100644
index 6896ecd..0000000
--- a/conf/user/afm-user-session.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Application Framework Master, User session setup
-
-[Service]
-Type=notify
-ExecStart=/usr/bin/afm-user-session
-
-[Install]
-WantedBy=default.target
-
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8f081ee..2346db0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -183,7 +183,7 @@ if(libsystemd_FOUND AND AFB_FOUND)
install(TARGETS afm-binding LIBRARY DESTINATION ${afm_libexecdir})
add_executable(afm-user-session afm-user-session.c)
- install(TARGETS afm-user-session DESTINATION ${CMAKE_INSTALL_BINDIR}
+ install(TARGETS afm-user-session DESTINATION ${afm_libexecdir}
PERMISSIONS SETUID OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
else()