mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-12 16:03:13 +00:00
8349196571
Rename jffs2reset to factoryreset. Convert all scripts to using the new command line. Print a deprecation notice when jffs2reset is invoked. 49d36ba jffs2reset: rename to factoryreset b135064 jffs2reset: print deprecation message Signed-off-by: John Crispin <john@phrozen.org>
32 lines
421 B
Bash
Executable File
32 lines
421 B
Bash
Executable File
#!/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
|
|
factoryreset -y && reboot &
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
return 0
|