You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
300 B
Bash
21 lines
300 B
Bash
#!/bin/sh
|
|
|
|
[ "${ACTION}" = "pressed" ] && exit 10
|
|
|
|
. /lib/functions.sh
|
|
|
|
logger "$BUTTON pressed for $SEEN seconds"
|
|
|
|
if [ "$SEEN" -lt 10 ]
|
|
then
|
|
echo "REBOOT" > /dev/console
|
|
sync
|
|
reboot
|
|
elif [ "$ACTION" = "timeout" ]
|
|
then
|
|
echo "FACTORY RESET" > /dev/console
|
|
jffs2reset -y && reboot &
|
|
fi
|
|
|
|
return 0
|