aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc/rc.button/reset
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files/etc/rc.button/reset')
-rwxr-xr-xpackage/base-files/files/etc/rc.button/reset6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/base-files/files/etc/rc.button/reset b/package/base-files/files/etc/rc.button/reset
index c6dc7cfbc0..4265767437 100755
--- a/package/base-files/files/etc/rc.button/reset
+++ b/package/base-files/files/etc/rc.button/reset
@@ -2,8 +2,12 @@
. /lib/functions.sh
+OVERLAY="$( grep ' /overlay ' /proc/mounts )"
+
case "$ACTION" in
pressed)
+ [ -z "$OVERLAY" ] && return 0
+
return 5
;;
timeout)
@@ -16,7 +20,7 @@ released)
echo "REBOOT" > /dev/console
sync
reboot
- elif [ "$SEEN" -gt 5 ]
+ elif [ "$SEEN" -gt 5 -a -n "$OVERLAY" ]
then
echo "FACTORY RESET" > /dev/console
jffs2reset -y && reboot &