#touch sensor start
echo 1 > /sys/class/i2c-adapter/i2c-2/2-004a/touchstart
-if [ -e /opt/etc/.coredump ]; then
+echo -e "[${_G}run profile${C_}]"
+# Run profile
+. /etc/profile
+
+if [ -e /opt/etc/.debugmode ]; then
+ echo "debug mode enabled"
+ # for bluescreen
+ export LD_PRELOAD=/usr/lib/libsys-assert.so
# enable coredump
- echo "/opt/usr/share/crash/core/%p_%s_%e.core" > /proc/sys/kernel/core_pattern
+ echo "/opt/bs/core/core.%p" > /proc/sys/kernel/core_pattern
ulimit -c unlimited
else
- echo "core dump disabled"
- ulimit -c 0
+ echo "debug mode disabled"
fi
-echo -e "[${_G}run profile${C_}]"
-# Run profile
-. /etc/profile
-
/usr/bin/press 1 # wait input to stop running scripts
if [ $? -eq 0 ]; then
echo "script is stopped"