#!/bin/sh

progdir=$(dirname "$0")
mount -o remount,rw /misc

if [ -f /misc/enableADB ]; then
	rm /misc/enableADB
	$progdir/adb/printstr "       ADB Disabled       "
else
	touch /misc/enableADB
	$progdir/adb/printstr "       ADB Enabled        "
fi
sync
sleep 2
mount -o remount,ro /misc
$progdir/adb/printstr "    Shutdown...    "
sleep 2
poweroff -f
while true
do
	sleep 5
done
