-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The default OpenWRT behavior for a long press of the reset button over 5 secs is to completely erase the changed files overlay on the squashfs filesystem. This commit replaces that to only delete the rita dashboard password and to remove only the wifi config from the overlay directory. It does not do anything regarding the SSH password. This reset button change is optional and controlled by the ansible var reset_button_alt. This is only enabled by default for hawk managed images.
- Loading branch information
Showing
4 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
|
||
. /lib/functions.sh | ||
|
||
OVERLAY="$( grep ' /overlay ' /proc/mounts )" | ||
|
||
case "$ACTION" in | ||
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 "ROUTER RESET" > /dev/console | ||
rm /overlay/upper/etc/config/wireless | ||
/etc/init.d/rita stop | ||
sed -i 's/rita_dashboard_password.*//g' /etc/rita.toml | ||
sync | ||
reboot | ||
fi | ||
;; | ||
esac | ||
|
||
return 0 |