#! /bin/sh # # For Charging Boot set -a do_charging_ani() { echo "charging animation ..." #export HW-dependent ENV variables which are read by charging-animation HW_NAME=`cat /proc/cpuinfo | grep Hardware | awk -F ':' '{print $2}' | tr -d ' '` if [ "${HW_NAME}" = "TRATS" ]; then source @CFGDIR@/tizen.cfg else source @CFGDIR@/tizen.cfg fi source @CFGDIR@/common.cfg # export the platform specific variables source /etc/sysconfig/charging-animation echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor INPUT_SEARCH_BASE=/sys/class/input CANDIDATE=`ls ${INPUT_SEARCH_BASE} | grep input` FOUND= for f in ${CANDIDATE} do DEV_NAME=`cat ${INPUT_SEARCH_BASE}/${f}/name` if [ "${DEV_NAME}" = "gpio-keys" ]; then FOUND=${f} break fi done if [ "X${FOUND}" = "X" ]; then echo "[error] cannot find key input event node" fi FOUND_NUM=${FOUND##input} KEY_EVENT=/dev/input/event${FOUND_NUM} /usr/bin/charging-animation $KEY_EVENT & } charging_boot=`grep charger_detect_boot /proc/cmdline` if [ "z$charging_boot" != "z" ]; then do_charging_ani # for logs mount -a syslogd -O /opt/var/log/messages-chrg klogd fi