Obtain TZ_BUILD_DATE in the same manner from OBS and QuickBuild
[platform/upstream/meta-generic.git] / scripts / generic-users.post
1 #!/bin/sh
2 echo "#################### generic-users.post ####################"
3
4 if ! generic_base_user_exists owner; then
5         # By default GUM will create users in /opt/etc/passwd, which is
6         # additional users database suitable for end-user created accounts.
7         # However, the 'owner' user is shipped by Tizen system itself and
8         # it's its default user.  Consequently, it should always be available
9         # and thus, it should be added to /etc/passwd.
10         conf=/etc/gumd/gumd.conf
11         origf=${conf}.orig
12         mv -v $conf $origf
13         sed -e 's,^\(PASSWD_FILE\).*,\1=/etc/passwd,' -e 's,^\(SHADOW_FILE\).*,\1=/etc/shadow,' <$origf >$conf
14         gum-utils --offline --add-user --username=owner --usertype=admin --usecret=""
15         mv -v $origf $conf
16 fi
17
18