gs-common: Update init scripts from BP2A
Change-Id: Ibb8d3715ec6cb9ebb5d89e116374d468dfcad826
This commit is contained in:
parent
eeb40af781
commit
dc28234ecd
6 changed files with 94 additions and 15 deletions
|
@ -4,22 +4,27 @@ DIR=/data/vendor/dump_touch
|
|||
LOCKFILE="$DIR"/dumping
|
||||
LOGFILE="$DIR"/dump.log
|
||||
|
||||
if [ ! -f $LOCKFILE ]
|
||||
if [ ! -f $LOCKFILE ] || [ ! -f $LOGFILE ] || [ "$(cat $LOCKFILE)" = 0 ]
|
||||
then
|
||||
echo "-----------------------------------------------------"
|
||||
echo "Error : PreDump Touch Logs couldn't be found."
|
||||
echo "Info : Touch debug data not found! Backfilling..."
|
||||
echo "-----------------------------------------------------"
|
||||
exit 2
|
||||
/vendor/bin/predump_touch.sh > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
state=$(cat $LOCKFILE)
|
||||
if [ "$state" != 2 ]
|
||||
then
|
||||
echo "Unexpected state! Expected 2 but found ${state}" >> $LOGFILE
|
||||
echo "Unexpected state! Expected 2 but found ${state}"
|
||||
fi
|
||||
|
||||
cat $LOGFILE
|
||||
echo "" > $LOGFILE
|
||||
|
||||
echo 0 > $LOCKFILE
|
||||
if [ -f $LOGFILE ]
|
||||
then
|
||||
cat $LOGFILE
|
||||
echo "" > $LOGFILE
|
||||
fi
|
||||
|
||||
if [ -f $LOCKFILE ]
|
||||
then
|
||||
echo 0 > $LOCKFILE
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue