Use dbus for event notification
[platform/core/security/ode.git] / fota / 500.ode_upgrade.sh
1 #!/bin/bash
2 # RW Update Script for 3.0 -> 4.0 and 4.0 -> 4.0
3 # Update ode status whenever doing FOTA
4 PATH=/bin:/usr/bin:/sbin:/usr/sbin
5 source /usr/share/upgrade/rw-update-macro.inc
6 get_version_info
7
8 ODE_STATE=`vconftool get -t string db/ode/crypto_state`
9 ODE_STATE=${ODE_STATE#*=}
10 ODE_STATE=${ODE_STATE%(*}
11
12 if [ $ODE_STATE = "notsupported" ]; then
13 vconftool set -f -t string db/ode/crypto_state "unencrypted"
14 elif [ $ODE_STATE = "mounted" ]; then
15 vconftool set -f -t string db/ode/crypto_state "encrypted"
16 fi
17
18 if [ -e /opt/etc/ode_footer ]; then
19         touch /opt/etc/.ode_upgrade_started
20         rm -f /opt/etc/ode_footer
21 fi