4 echo "This is new install of wrt-commons"
5 echo "Calling /usr/bin/wrt_commons_reset_db.sh"
6 /usr/bin/wrt_commons_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 AUTOSAVE_OLD_DB_VERSION=`sqlite3 /opt/dbspace/.wrt_autosave.db ".tables" | grep "DB_VERSION_"`
12 AUTOSAVE_NEW_DB_VERSION=`cat /usr/share/wrt-engine/wrt_autosave_db.sql | tr '[:blank:]' '\n' | grep DB_VERSION_`
13 echo "OLD wrt database version ${WRT_OLD_DB_VERSION}"
14 echo "NEW wrt database version ${WRT_NEW_DB_VERSION}"
15 echo "OLD wrt_autosave database version ${AUTOSAVE_OLD_DB_VERSION}"
16 echo "NEW wrt_autosave database version ${AUTOSAVE_NEW_DB_VERSION}"
18 if [ ${WRT_OLD_DB_VERSION} -a ${WRT_NEW_DB_VERSION} -a ${AUTOSAVE_OLD_DB_VERSION} -a ${AUTOSAVE_NEW_DB_VERSION} ]
20 if [ ${WRT_NEW_DB_VERSION} = ${WRT_OLD_DB_VERSION} -a ${AUTOSAVE_NEW_DB_VERSION} = ${AUTOSAVE_OLD_DB_VERSION} ]
22 echo "Equal database detected so db installation ignored"
24 echo "Calling /usr/bin/wrt_commons_reset_db.sh"
25 /usr/bin/wrt_commons_reset_db.sh
28 echo "Calling /usr/bin/wrt_commons_reset_db.sh"
29 /usr/bin/wrt_commons_reset_db.sh
34 mkdir -p /usr/apps/org.tizen.policy
37 # WARNING: THIS IS TEMPORARY SOLUTION, AS THIS SHOULD NOT BE OUR
38 # RESPONSIBILITY!!! WE HAVE TO CONTACT TO DBUS MAINAINERS
40 if [ -f /var/lib/dbus/machine-id ]; then
41 echo "machine-id exists"
43 if [ -f /usr/var/lib/dbus/machine-id ]; then
44 echo "machine-id exists"
46 echo "Creating machine-id"
47 mkdir -p /usr/var/lib/dbus/
48 dbus-uuidgen > /usr/var/lib/dbus/machine-id
49 dbus-uuidgen --ensure=/usr/var/lib/dbus/machine-id
51 mkdir -p /var/lib/dbus/
52 cp /usr/var/lib/dbus/machine-id /var/lib/dbus/
55 echo "[WRT] wrt-commons postinst done ..."