From 504a5ba1dcf6621402cbe9b86e48f6db1a3f8190 Mon Sep 17 00:00:00 2001 From: wchang kim Date: Fri, 27 Oct 2017 12:37:21 +0900 Subject: [PATCH] [Update] Adding Tizen IoT Platform to common.yaml 1. Adding Tizen IoT Platform to common.yaml 2. Change the file name. common-cleanup-rpi3 -> common-cleanup-directory Change-Id: I26211ba67e514fd5c1c43b651dfa1000c701d2d6 --- common.yaml | 28 +++++++++++++++++++--- ...nup-rpi3.post => common-cleanup-directory.post} | 2 +- scripts/common-crosswalk.post | 4 ++++ scripts/common-wayland.post | 2 +- scripts/iot-headless-base.post | 27 +++++++++++++++++++++ 5 files changed, 58 insertions(+), 5 deletions(-) rename scripts/{common-cleanup-rpi3.post => common-cleanup-directory.post} (61%) create mode 100644 scripts/iot-headless-base.post diff --git a/common.yaml b/common.yaml index 9590a07..3455117 100644 --- a/common.yaml +++ b/common.yaml @@ -207,7 +207,7 @@ RPi3 Headless: - common-crosswalk - common-license - generic-security - - common-cleanup-rpi3 + - common-cleanup-directory Repos: [] NoChrootScripts: - buildname @@ -232,7 +232,7 @@ RPi3 Docker: - common-crosswalk - common-license - generic-security - - common-cleanup-rpi3 + - common-cleanup-directory Repos: [] NoChrootScripts: - buildname @@ -258,7 +258,29 @@ Artik530_710 Headless: - common-crosswalk - common-license - generic-security - - common-cleanup-rpi3 + - common-cleanup-directory + Repos: [] + NoChrootScripts: + - buildname +Tizen IoT: + Part: common-3parts-ramdisk + Groups: + - IoT Headless Base + PostScripts: + - generic-adaptation + - generic-base + - iot-headless-base + - generic-wayland + - generic-middleware + - generic-applications + - generic-bluetooth + - generic-multimedia + - generic-desktop-applications + - generic-crosswalk + - common-crosswalk + - common-license + - generic-security + - common-cleanup-directory Repos: [] NoChrootScripts: - buildname diff --git a/scripts/common-cleanup-rpi3.post b/scripts/common-cleanup-directory.post similarity index 61% rename from scripts/common-cleanup-rpi3.post rename to scripts/common-cleanup-directory.post index aac98e7..bad61fe 100644 --- a/scripts/common-cleanup-rpi3.post +++ b/scripts/common-cleanup-directory.post @@ -1,5 +1,5 @@ #!/bin/sh -echo "############### common-cleanup-rpi3.post ################" +echo "############### common-cleanup-directory.post ################" # remove manuals, docs and headers rm -rf /usr/include diff --git a/scripts/common-crosswalk.post b/scripts/common-crosswalk.post index 83b6f13..c9511cb 100644 --- a/scripts/common-crosswalk.post +++ b/scripts/common-crosswalk.post @@ -2,5 +2,9 @@ echo "############### common-crosswalk.post ################" # start wrt widgets preinstall +rpm -qa | grep wrt-widget +if [ $? = 0 ] +then prepare_widgets.sh +fi diff --git a/scripts/common-wayland.post b/scripts/common-wayland.post index 99a63a9..c4ddae0 100644 --- a/scripts/common-wayland.post +++ b/scripts/common-wayland.post @@ -4,7 +4,7 @@ echo "#################### common-wayland.post ##################" # add users to display group for user in alice bob carol guest developer owner; do if generic_base_user_exists $user; then - /usr/sbin/groupmod -A $user display + /usr/sbin/usermod -G display $user fi done diff --git a/scripts/iot-headless-base.post b/scripts/iot-headless-base.post new file mode 100644 index 0000000..8fa9285 --- /dev/null +++ b/scripts/iot-headless-base.post @@ -0,0 +1,27 @@ +#!/bin/sh + +echo "############### iot-headless-base.post ################" + +######### multiuser mode: create additional users and fix their homedirs +if ! generic_base_user_exists owner; then + gum-utils --offline --add-user --username=owner --usertype=admin --usecret=tizen +fi + +if ! generic_base_user_exists guest; then + gum-utils --offline --add-user --username=guest --usertype=normal --usecret=tizen +fi + +######### add 'guest' user that runs bt-service daemon to vconf_bt group +function mygetid() { sed '/^'"$1"':/!d;s/^\([^:]*:\)\{2\}\([^:]*\):.*$/\2/' "$2"; } +function mygetuid() { mygetid "$1" /etc/passwd; } +function mygetgid() { mygetid "$1" /etc/group; } + +gum-utils --offline --add-member --gid=$(mygetgid vconf_bt) --mem_uid=$(mygetuid guest) + +######### Execute pkg_initdb if there is no pkgmgr-tool pacakge +rpm -qa | grep pkgmgr-tool +if [ $? != 0 ] +then +pkg_initdb --ro +fi + -- 2.7.4