#!/bin/sh

while true; do
	if [ `cat /sys/class/gpio/gpio48/value` != '1' ]; then
		sleep 10
		echo ...unmounting /Core
		umount -r /Core
#		echo ...unmounting rootfs
#		umount /
#		echo ...unmounting /app
#		umount /app
		poweroff
		break
	fi;
	msleep 200
done;
