1#!/vendor/bin/sh
2
3DIR=/data/vendor/dump_touch
4LOCKFILE="$DIR"/dumping
5LOGFILE="$DIR"/dump.log
6
7if [ ! -f $LOCKFILE ]
8then
9	echo "-----------------------------------------------------"
10	echo "Error : PreDump Touch Logs couldn't be found."
11	echo "-----------------------------------------------------"
12	exit 2
13fi
14
15state=$(cat $LOCKFILE)
16if [ "$state" != 2 ]
17then
18  echo "Unexpected state! Expected 2 but found ${state}" >> $LOGFILE
19fi
20
21cat $LOGFILE
22echo "" > $LOGFILE
23
24echo 0 > $LOCKFILE
25
26