#!/bin/sh #Get EETI Debug information script. Version 1.0 (20201007) INFO_PATH="./eeti/info.html" DMESG_PATH="./eeti/dmesg" INFO_FOLDER="./eeti/" CheckPermission() { echo -n "(I) Check user permission:" account=`whoami` if [ ${account} = "root" ]; then echo " ${account}, you are the supervisor." else echo " ${account}, you are NOT the supervisor." echo "(E) The root permission is required to run this installer." echo "" exit 1 fi } CheckPermission echo "Start to collect log..." #Modify DebugBits CONFIG_FILE="/etc/eGTouchL.ini" DEBUG_BITS="FFFFF" sed -i '2d' $CONFIG_FILE sed -i '1a DebugEnableBits\t\t\t'`echo $DEBUG_BITS` $CONFIG_FILE #Restart driver eGTouchD -f sleep 5 #Create folder to put information mkdir $INFO_FOLDER touch $INFO_PATH chmod 666 $INFO_PATH #Print Information to file { echo "" echo "" echo "" echo "

EETI Debug Log

" echo "" echo "" date echo "

=====CPU Arch.=====

" lscpu | grep Architecture echo "" echo "" echo "

=====Kernel version.=====

" uname -r echo "" echo "" echo "

=====Distribution Info.=====

" cat /etc/*release echo "" echo "" echo "

=====Display server=====

" ps -e | grep tty echo "" echo "" echo "

=====Xinput Info.=====

" xinput list echo "" echo "" echo "

=====Input Devices=====

" cat /proc/bus/input/devices echo "" echo "" echo "" }> $INFO_PATH #Copy dmesg dmesg >> "$DMESG_PATH" #Copy driver log cp /tmp/eGTouch* $INFO_FOLDER #Recover DebugBits DEBUG_BITS="1" sed -i '2d' $CONFIG_FILE sed -i '1a DebugEnableBits\t\t\t'`echo $DEBUG_BITS` $CONFIG_FILE #Copy config file cp $CONFIG_FILE $INFO_FOLDER #Restart driver eGTouchD -f tar --remove-files -zcvf ./eeti.tar.gz $INFO_FOLDER > /dev/null echo "Finish."