diff options
Diffstat (limited to 'conf/system')
-rw-r--r-- | conf/system/CMakeLists.txt | 10 | ||||
-rw-r--r-- | conf/system/afm-system-setup.sh.in | 2 | ||||
-rw-r--r-- | conf/system/afm-user-setup.sh.in | 22 | ||||
-rw-r--r-- | conf/system/afm-user-setup@.service.in | 3 | ||||
l--------- | conf/system/user-runtime-dir@.service.wants/afm-user-setup@.service | 1 |
5 files changed, 30 insertions, 8 deletions
diff --git a/conf/system/CMakeLists.txt b/conf/system/CMakeLists.txt index eba8d42..3cabd0c 100644 --- a/conf/system/CMakeLists.txt +++ b/conf/system/CMakeLists.txt @@ -18,6 +18,10 @@ cmake_minimum_required(VERSION 2.8) +if(AGL_DEVEL) + set(create_platform_debug "dodir ${afm_platform_rundir}/debug") +endif() + configure_file(afm-system-daemon.service.in afm-system-daemon.service) configure_file(afm-system-daemon.socket.in afm-system-daemon.socket) configure_file(afm-system-setup.service.in afm-system-setup.service) @@ -47,6 +51,12 @@ if(NOT USE_SDK) ${UNITDIR_SYSTEM} ) install( + DIRECTORY + ${CMAKE_CURRENT_SOURCE_DIR}/user-runtime-dir@.service.wants + DESTINATION + ${UNITDIR_SYSTEM} + ) + install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/afm-user-setup.sh ${CMAKE_CURRENT_BINARY_DIR}/afm-system-setup.sh diff --git a/conf/system/afm-system-setup.sh.in b/conf/system/afm-system-setup.sh.in index 2af411c..65e75ed 100644 --- a/conf/system/afm-system-setup.sh.in +++ b/conf/system/afm-system-setup.sh.in @@ -13,4 +13,4 @@ dodir $pdir dodir $pdir/display dodir $pdir/apis dodir $pdir/apis/ws - +@create_platform_debug@ diff --git a/conf/system/afm-user-setup.sh.in b/conf/system/afm-user-setup.sh.in index 24795ae..076676f 100644 --- a/conf/system/afm-user-setup.sh.in +++ b/conf/system/afm-user-setup.sh.in @@ -3,18 +3,28 @@ uid=$1 udir=/run/user/$uid -dodir() { +dodir_star() { if ! test -e $1; then mkdir -m 700 $1 chown $uid:$uid $1 - chsmack -a '*' $1 fi + chsmack -a '*' $1 } -dodir $udir -dodir $udir/apis -dodir $udir/apis/ws -dodir $udir/apis/link +dodir_star $udir +dodir_star $udir/apis +dodir_star $udir/apis/ws +dodir_star $udir/apis/link + +dodir_usrshr() { + if ! test -e $1; then + mkdir -m 700 $1 + chown $uid:$uid $1 + fi + chsmack -a User::App-Shared -t $1 +} + +dodir_usrshr $udir/usrshr doln() { if ! test -e $2; then diff --git a/conf/system/afm-user-setup@.service.in b/conf/system/afm-user-setup@.service.in index 86c0422..c1e4f1e 100644 --- a/conf/system/afm-user-setup@.service.in +++ b/conf/system/afm-user-setup@.service.in @@ -1,6 +1,7 @@ [Unit] Description=Initiate afm-user-setup %i -After=user@%i.service +After=user-runtime-dir@%i.service +Before=user@%i.service [Service] Type=oneshot StartLimitInterval=0 diff --git a/conf/system/user-runtime-dir@.service.wants/afm-user-setup@.service b/conf/system/user-runtime-dir@.service.wants/afm-user-setup@.service new file mode 120000 index 0000000..07fe155 --- /dev/null +++ b/conf/system/user-runtime-dir@.service.wants/afm-user-setup@.service @@ -0,0 +1 @@ +../afm-user-setup@.service
\ No newline at end of file |