10c2366057f87fb5924699799454043f54dc8597
[apps/core/preloaded/charging-animation.git] / run-chg-ani.in
1 #! /bin/sh
2 #
3 # For Charging Boot
4
5 do_charging_ani() {
6         echo "charging animation ..."
7
8 #export HW-dependent ENV variables which are read by charging-animation
9         HW_NAME=`cat /proc/cpuinfo | grep Hardware | awk -F ':' '{print $2}' | tr -d ' '`
10         if [ "${HW_NAME}" = "TRATS" ]; then
11                 source @CFGDIR@/tizen.cfg
12         else
13                 source @CFGDIR@/tizen.cfg
14         fi
15
16         source @CFGDIR@/common.cfg
17
18         if [ "${CHG_ENV_SUPPORT_DRM}" = "1" ]; then
19                 /sbin/udevd --daemon
20                 /sbin/udevadm trigger --subsystem-match=drm
21         fi
22
23         echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
24         /usr/bin/charging-animation &
25 }
26
27
28 charging_boot=`grep charger_detect_boot /proc/cmdline`
29 if [ "z$charging_boot" != "z" ]; then
30         do_charging_ani
31 # for logs
32         mount -a
33         syslogd -O /opt/var/log/messages-chrg
34         klogd
35 fi