View Single Post
Old 11-04-2013, 02:01 PM   #3
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Moderately Passive remover.

or alternately:
(since this thread is not exclusively for the PW and that script will crash older devices)

Code:
#!/bin/sh

PLATFORM="$(cat /sys/devices/platform/mxc_epdc_fb/graphics/fb0/modes)"

echo $PLATFORM

if [ -z "$PLATFORM"  ]; then
	# it's probably something ancient
	

	if [ ! -e /proc/fiveway_wake   ] ; then

	echo "k2 or something detected"

		echo "" > /var/log/messages; tail -f /var/log/messages 2>/dev/null | \
		awk '/.*PageAction*./ || /.*acxmgrd*./ || /.*NextPage*./ || /.*Reader*./ {system("/mnt/us/extensions/hideProgressBar/bin/wiperk2.sh &")}  '
		exit 0


		else
	echo "k3 or k4 or something detected"

		echo "" > /var/log/messages; tail -f /var/log/messages 2>/dev/null | \
		awk '/.*PageAction*./ || /.*acxmgrd*./ || /.*NextPage*./ || /.*Reader*./ {system("/mnt/us/extensions/hideProgressBar/bin/wiperk4.sh &")}  '
		exit 0

	fi

fi

if [ -n "$PLATFORM"  ]; then
	if [ "$PLATFORM" != "${PLATFORM/758/}" ]; then

	echo "PW detected"

	echo "" > /var/log/messages; tail -F /var/log/messages 2>/dev/null | exec /usr/bin/parselog | \
	awk '/.*PageTurnAction*./ || /.*JunoExecutionManager*./  {system("eips -d l=FFF,w=758,h=48 -x 0 -y 977")}  '

	else
	# it's something else, probably older

	echo "Non-PW detected"

	echo "" > /var/log/messages; tail -F /var/log/messages 2>/dev/null | exec /usr/bin/parselog | \
	awk '/.*PageAction*./ || /.*acxmgrd*./ {system("eips -d l=FFF,w=600,h=40 -x 0 -y 760 ")}  '

	fi
fi

Last edited by twobob; 11-04-2013 at 07:47 PM. Reason: Added startup use-case for older and newer devices.
twobob is offline   Reply With Quote