#!/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` if [ ! -e /system-update ] then /usr/bin/touch $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 /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 $NEW_USER $TZ_USER_SHARE/media/.thumb -type d -exec /usr/bin/chsmack -a 'User::App::Shared' -t {} + fi