aboutsummaryrefslogtreecommitdiffstats
path: root/meta-application-manager/recipes-others
diff options
context:
space:
mode:
authorKazumasa Mitsunari <kazumasa_mitsunari_za@mail.toyota.co.jp>2016-11-08 11:49:02 +0900
committerKazumasa Mitsunari <kazumasa_mitsunari_za@mail.toyota.co.jp>2016-11-08 11:49:02 +0900
commit3327570246b6ec0e1949ba44b25badf5f0eb63b5 (patch)
treee7fea696ece17a989dc0e6a1ba5b443ff2144e2b /meta-application-manager/recipes-others
parent0de8b1f6bbc2ec0bb743859573c2f7a812d19004 (diff)
Enable aglglobalapp to renderHEADmaster
1. Enable aglglobalapp to render app using libEGL.so. Originally AGL enables only root user to use libEGL.so because a device is owned by root and video group. It caused users fail to initialize EGL config. 2. Enable user to use XDG_RUNTIME_DIR=/run/user/0 Users don't need to write shell script basically. But if application would like to set unieque environment variables, it is necessary to write shell script. Signed-off-by: Kazumasa Mitsunari <kazumasa_mitsunari_za@mail.toyota.co.jp>
Diffstat (limited to 'meta-application-manager/recipes-others')
-rwxr-xr-xmeta-application-manager/recipes-others/pkgmgr-first-setup-service/files/pkgmgr-first-setup.sh26
1 files changed, 13 insertions, 13 deletions
diff --git a/meta-application-manager/recipes-others/pkgmgr-first-setup-service/files/pkgmgr-first-setup.sh b/meta-application-manager/recipes-others/pkgmgr-first-setup-service/files/pkgmgr-first-setup.sh
index 09cb3de..eec7b86 100755
--- a/meta-application-manager/recipes-others/pkgmgr-first-setup-service/files/pkgmgr-first-setup.sh
+++ b/meta-application-manager/recipes-others/pkgmgr-first-setup-service/files/pkgmgr-first-setup.sh
@@ -1,6 +1,12 @@
-#!/bin/sh -e
+#!/bin/sh
+
+grep "^aglglobalapp:" /etc/group >> /dev/null
+if [ $? -ne 0 ]; then
+ # To add a user "aglglobalapp"
+ useradd aglglobalapp
+ FIRST_TIME="ON"
+fi
-useradd aglglobalapp
loginctl enable-linger aglglobalapp
vconftool set -t string db/ail/ail_info "0" -f -s system::vconf_inhouse
vconftool set -t string db/menuscreen/desktop "0" -f -s system::vconf_inhouse
@@ -22,15 +28,9 @@ chown aglglobalapp:root /usr/share/applications
chown aglglobalapp:root /usr/apps
chown aglglobalapp:root /usr/dbspace
-pkg_initdb
-ail_initdb
-
-if [ -e /usr/lib/systemd/system/multi-user.target.wantspkgmgr-first-setup.service ]
-then
- rm /usr/lib/systemd/system/multi-user.target.wants/pkgmgr-first-setup.service
-fi
-
-if [ -e /lib/systemd/system/multi-user.target.wants/pkgmgr-first-setup.service ]
-then
- rm /lib/systemd/system/multi-user.target.wants/pkgmgr-first-setup.service
+if [ "$FIRST_TIME" ]; then
+ # This is carried out only at the time of "useradd aglglobalapp" run
+ gpasswd -a aglglobalapp video
+ pkg_initdb
+ ail_initdb
fi