4 echo "This is new install of wrt-commons"
5 echo "Calling /usr/bin/wrt_reset_db.sh"
6 /usr/bin/wrt_reset_db.sh
8 # Find out old and new version of databases
9 WRT_OLD_DB_VERSION=`sqlite3 /opt/dbspace/.wrt.db ".tables" | grep "DB_VERSION_"`
10 WRT_NEW_DB_VERSION=`cat /usr/share/wrt-engine/wrt_db.sql | tr '[:blank:]' '\n' | grep DB_VERSION_`
11 ACE_OLD_DB_VERSION=`sqlite3 /opt/dbspace/.ace.db ".tables" | grep "DB_VERSION_"`
12 ACE_NEW_DB_VERSION=`cat /usr/share/wrt-engine/ace_db.sql | tr '[:blank:]' '\n' | grep DB_VERSION_`
13 VCORE_OLD_DB_VERSION=`sqlite3 /opt/dbspace/.vcore.db ".tables" | grep "DB_VERSION_"`
14 VCORE_NEW_DB_VERSION=`cat /usr/share/wrt-engine/vcore_db.sql | tr '[:blank:]' '\n' | grep DB_VERSION_`
15 echo "OLD wrt database version ${WRT_OLD_DB_VERSION}"
16 echo "NEW wrt database version ${WRT_NEW_DB_VERSION}"
17 echo "OLD ace database version ${ACE_OLD_DB_VERSION}"
18 echo "NEW ace database version ${ACE_NEW_DB_VERSION}"
19 echo "OLD vcore database version ${VCORE_OLD_DB_VERSION}"
20 echo "NEW vcore database version ${VCORE_NEW_DB_VERSION}"
23 if [ ${WRT_OLD_DB_VERSION} -a ${WRT_NEW_DB_VERSION} -a ${ACE_OLD_DB_VERSION} -a ${ACE_NEW_DB_VERSION} -a ${VCORE_OLD_DB_VERSION} -a ${VCORE_NEW_DB_VERSION} ]
25 if [ ${WRT_NEW_DB_VERSION} = ${WRT_OLD_DB_VERSION} -a ${ACE_NEW_DB_VERSION} = ${ACE_OLD_DB_VERSION} -a ${VCORE_OLD_DB_VERSION} = ${VCORE_NEW_DB_VERSION} ]
27 echo "Equal database detected so db installation ignored"
29 echo "Calling /usr/bin/wrt_reset_db.sh"
30 /usr/bin/wrt_reset_db.sh
33 echo "Calling /usr/bin/wrt_reset_db.sh"
34 /usr/bin/wrt_reset_db.sh
39 mkdir -p /usr/apps/org.tizen.policy
42 chown root:root /usr/etc/ace/config.xml
45 # WARNING: THIS IS TEMPORARY SOLUTION, AS THIS SHOULD NOT BE OUR
46 # RESPONSIBILITY!!! WE HAVE TO CONTACT TO DBUS MAINAINERS
48 if [ -f /var/lib/dbus/machine-id ]; then
49 echo "machine-id exists"
51 if [ -f /usr/var/lib/dbus/machine-id ]; then
52 echo "machine-id exists"
54 echo "Creating machine-id"
55 mkdir -p /usr/var/lib/dbus/
56 dbus-uuidgen > /usr/var/lib/dbus/machine-id
57 dbus-uuidgen --ensure=/usr/var/lib/dbus/machine-id
59 mkdir -p /var/lib/dbus/
60 cp /usr/var/lib/dbus/machine-id /var/lib/dbus/
63 echo "[WRT] wrt-commons postinst done ..."