#!/bin/bash
#===============================================================================
# SSS Firmware
#===============================================================================
# File 			:	key_eventd
# Who			:	JWB
# Descripttion	:	Action of kernel event
#
# Copyright		:	LG ELECTRONICS INC.
# history 		:	2008.11.03 started first
#===============================================================================

#SSS script library
. /etc/sss_script/event/lib_sss

bTimeCnt=0
while : 
do
	saKE=(`cat $SSS_NOTICE`)
	if [ ${#saKE[*]} -ge 5 ]; then
		KernelEventProcess ${saKE[1]} ${saKE[3]} ${saKE[5]}
	else
		sleep 6
		bTimeCnt=$(($bTimeCnt + 1))
		if [ "$(($bTimeCnt % 20))" = 0 ]; then
			SSS_SetTime
		fi
		if [ "$bTimeCnt" -gt 100 ]; then
			bTimeCnt=0
			SSS_SetStorageCapa
		fi
		continue;
	fi
done