diff options
author | José Bollo <jose.bollo@iot.bzh> | 2019-06-06 12:11:14 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2019-06-14 11:17:53 +0200 |
commit | 533d5a1a51a07f2f92e508d113cb49d373e1bad8 (patch) | |
tree | ebfaa7db1f265b5c62e36fb0094cd34903d6dfe8 /conf/system/afm-user-setup.sh.in | |
parent | 77bd42075de481ae89f6a5b2bc8a79bf967d95cd (diff) |
Fix synchronisation of user setup
The user setup takes care of populating correctly the
directory /run/user/UID with needed items BEFORE
user services start.
Bug-AGL: SPEC-1015
Change-Id: I6f942d73bf241d593c960dbf3bc6a038f1746fe0
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'conf/system/afm-user-setup.sh.in')
-rw-r--r-- | conf/system/afm-user-setup.sh.in | 22 |
1 files changed, 16 insertions, 6 deletions
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 |