projects
/
librecmc
/
librecmc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
c6dc7cfbc04bb2a562045e1e1fbd27b45d079468
[librecmc/librecmc.git]
/
package
/
base-files
/
files
/
etc
/
rc.button
/
reset
1
#!/bin/sh
2
3
. /lib/functions.sh
4
5
case "$ACTION" in
6
pressed)
7
return 5
8
;;
9
timeout)
10
. /etc/diag.sh
11
set_state failsafe
12
;;
13
released)
14
if [ "$SEEN" -lt 1 ]
15
then
16
echo "REBOOT" > /dev/console
17
sync
18
reboot
19
elif [ "$SEEN" -gt 5 ]
20
then
21
echo "FACTORY RESET" > /dev/console
22
jffs2reset -y && reboot &
23
fi
24
;;
25
esac
26
27
return 0