Remove unnecessary comparison
[platform/core/multimedia/media-server.git] / 30_media-server-add.post
index dc0d5c0..c6bd1c6 100644 (file)
@@ -1,17 +1,27 @@
 #!/bin/sh -e
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
 
 NEW_USER=$1
 export `tzplatform-get --user $NEW_USER TZ_USER_SHARE`
 export `tzplatform-get --user $NEW_USER TZ_USER_DB`
+export `tzplatform-get --user $NEW_USER TZ_SYS_USER_GROUP`
 
+if [ ! -e /system-update ]
+then
 /usr/bin/touch $TZ_USER_DB/.media.db
-chown multimedia_fw:multimedia_fw $TZ_USER_DB/.media.db
-chmod 2644 $TZ_USER_DB/.media.db
+/usr/bin/chown multimedia_fw:multimedia_fw $TZ_USER_DB/.media.db
+/usr/bin/chmod 0644 $TZ_USER_DB/.media.db
+/usr/bin/chsmack -a 'User::Home' $TZ_USER_DB/.media.db
 
-mkdir -p $TZ_USER_SHARE/media/.thumb/phone
-mkdir -p $TZ_USER_SHARE/media/.thumb/mmc
-chown -R multimedia_fw:multimedia_fw $TZ_USER_SHARE/media
-/usr/bin/chsmack -a 'User::App::Shared' -t
-chmod 2775 $TZ_USER_SHARE/media
-chmod -R 2777 $TZ_USER_SHARE/media/.thumb
-find $NEW_USER $TZ_USER_SHARE/media/.thumb -type d -exec /usr/bin/chsmack -a 'User::App::Shared' -t {} +
+/usr/bin/mkdir -p $TZ_USER_SHARE/media/.thumb
+/usr/bin/chown -R multimedia_fw:multimedia_fw $TZ_USER_SHARE/media
+/usr/bin/chsmack -a 'User::App::Shared' -t $TZ_USER_SHARE/media
+/usr/bin/chmod 0775 $TZ_USER_SHARE/media
+/usr/bin/chmod -R 0777 $TZ_USER_SHARE/media/.thumb
+/usr/bin/find $TZ_USER_SHARE/media/.thumb -type d -exec /usr/bin/chsmack -a 'User::App::Shared' -t {} +
+
+/usr/bin/mkdir $TZ_USER_SHARE/media/.ebook
+/usr/bin/chown $NEW_USER:$TZ_SYS_USER_GROUP $TZ_USER_SHARE/media/.ebook
+/usr/bin/chmod 0775 $TZ_USER_SHARE/media/.ebook
+/usr/bin/chsmack -a 'User::App::Shared' -t $TZ_USER_SHARE/media/.ebook
+fi