各位大佬,侧面的Reset键有什么用?
thaoeu opened this issue · 4 comments
thaoeu commented
看有博客上说可以自定义功能,不知道在哪有支持
zhixiangjoy commented
同问
soffchen commented
/etc/rc.button/reset
#!/bin/sh
. /lib/functions.sh
OVERLAY="$( grep ' /overlay ' /proc/mounts )"
case "$ACTION" in
pressed)
[ -z "$OVERLAY" ] && return 0
return 5
;;
timeout)
. /etc/diag.sh
set_state failsafe
;;
released)
if [ "$SEEN" -lt 1 ]
then
echo "REBOOT" > /dev/console
sync
reboot
elif [ "$SEEN" -ge 5 -a -n "$OVERLAY" ]
then
echo "FACTORY RESET" > /dev/console
jffs2reset -y && reboot &
fi
;;
esac
return 0
soffchen commented
默认动作应该是短按释放重启,长按 5s 释放恢复出厂设置。
thaoeu commented
刚刚试了下,短按重启确实生效,才连上网。😓
长按不敢试了,感谢大佬解惑。