summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@open.eurogiciel.org>2015-02-05 17:53:01 +0100
committerJosé Bollo <jose.bollo@open.eurogiciel.org>2015-02-06 04:42:18 -0800
commit685707ac395459bc6504000bd6eb5c8f49efb83f (patch)
tree31104af2173cdd37bff1fabe7609582d4c94f29b /scripts
parent0b4a50741b52e1deb17bbd332b5347991da33115 (diff)
downloadmeta-685707ac395459bc6504000bd6eb5c8f49efb83f.tar.gz
meta-685707ac395459bc6504000bd6eb5c8f49efb83f.tar.bz2
meta-685707ac395459bc6504000bd6eb5c8f49efb83f.zip
The commands useradd/userdel/groupadd/groupmod are now handled by gumd equvalent calls to gum-utils. This patch removes the use of generic_base_fix_user_homedir that is implemented in tizen-platform-config. Change-Id: I75aa11d08960f1a14899f23f911a6189e879cee1 Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/common-base.post14
1 files changed, 6 insertions, 8 deletions
diff --git a/scripts/common-base.post b/scripts/common-base.post
index 939706b..d3f7ab7 100644
--- a/scripts/common-base.post
+++ b/scripts/common-base.post
@@ -2,18 +2,16 @@
echo "############### common-base.post ################"
######### multiuser mode: create additional users and fix their homedirs
-tizen_crypted_pass=$(perl -e 'print crypt("tizen", "aa")')
-uid=5001
-
for user in alice bob carol guest; do
if ! generic_base_user_exists $user; then
- useradd -u $uid -d /home/$user -g users -G audio,video,users,display -m --password "$tizen_crypted_pass" $user
- uid=$(( $uid + 1 ))
+ gum-utils --offline --add-user --username="$user" --usertype=normal --usecret=tizen
fi
-
- generic_base_fix_user_homedir $user
done
######### add 'guest' user that runs bt-service daemon to vconf_bt group
-/usr/sbin/groupmod -A guest vconf_bt
+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)