%post
/sbin/ldconfig
-mkdir -p /opt/usr/dbspace/
-##### History ######
-if [ ! -f /opt/usr/dbspace/.browser-history.db ];
-then
- sqlite3 /opt/usr/dbspace/.browser-history.db 'PRAGMA journal_mode=PERSIST;
- CREATE TABLE history(
- id INTEGER PRIMARY KEY AUTOINCREMENT
- , address
- , title
- , counter INTEGER
- , visitdate DATETIME
- , favicon BLOB
- , favicon_length INTEGER
- , favicon_w INTEGER
- , favicon_h INTEGER
- , snapshot BLOB
- , snapshot_stride INTEGER
- , snapshot_w INTEGER
- , snapshot_h INTEGER);'
-fi
-### Bookmark ###
-if [ ! -f /opt/usr/dbspace/.internet_bookmark.db ];
-then
- sqlite3 /opt/usr/dbspace/.internet_bookmark.db 'PRAGMA journal_mode=PERSIST;
- CREATE TABLE bookmarks(
- id INTEGER PRIMARY KEY AUTOINCREMENT
- ,type INTEGER
- ,parent INTEGER
- ,address
- ,title
- ,creationdate
- ,sequence INTEGER
- ,updatedate
- ,visitdate
- ,editable INTEGER
- ,accesscount INTEGER
- ,favicon BLOB
- ,favicon_length INTEGER
- ,favicon_w INTEGER
- ,favicon_h INTEGER
- ,created_date
- ,account_name
- ,account_type
- ,thumbnail BLOB
- ,thumbnail_length INTEGER
- ,thumbnail_w INTEGER
- ,thumbnail_h INTEGER
- ,version INTEGER
- ,sync
- ,tag1
- ,tag2
- ,tag3
- ,tag4
- );
- create index idx_bookmarks_on_parent_type on bookmarks(parent, type);
-
- CREATE TABLE tags(
- tag
- );'
-fi
-# Change db file owner & permission
-chown :5000 /opt/usr/dbspace/.browser-history.db
-chown :5000 /opt/usr/dbspace/.browser-history.db-journal
-chown :5000 /opt/usr/dbspace/.internet_bookmark.db
-chown :5000 /opt/usr/dbspace/.internet_bookmark.db-journal
-chmod 666 /opt/usr/dbspace/.browser-history.db
-chmod 666 /opt/usr/dbspace/.browser-history.db-journal
-chmod 666 /opt/usr/dbspace/.internet_bookmark.db
-chmod 666 /opt/usr/dbspace/.internet_bookmark.db-journal
+source /etc/tizen-platform.conf
+users_gid=$(getent group $TZ_SYS_USER_GROUP | cut -f3 -d':')
+ chsmack -a 'User' /opt/usr/dbspace/.browser-history.db*
+ chsmack -a 'User' /opt/usr/dbspace/.internet_bookmark.db*
+
# set default vconf values
##################################################
#internal keys