Hi.I was about disabling reset button of wr841.I saw some topics about disabling reset or others router buttons.But I have no success with modifying /etc/config/system file in WR841nd and WR741nd.
I completely remove reset button config and also changed max/min values but non of them disabled or change the reset button action.
At first I thought the problem would be new button config of 841nd v9 which the wps and reset button integrated:
but I also have no success with v7 which have separate button.
Would changing /etc/config/system file change the reset button action or not?
Modifying reset button action (SOLVED)
Moderator: Moderators
Modifying reset button action (SOLVED)
Last edited by harsini on Fri May 15, 2015 12:50 am, edited 1 time in total.
Re: Modifying reset button action
/etc/hotplug.d/button/
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
https://lantisproject.com/blog
Please be respectful when posting. I do this in my free time on a volunteer basis.
https://lantisproject.com/blog
Re: Modifying reset button action
I have a file named 00-buton there and its codes seems to be fine:Lantis wrote:/etc/hotplug.d/button/

Code: Select all
. /etc/functions.sh
do_button () {
local button
local action
local handler
local min
local max
config_get button $1 button
config_get action $1 action
config_get handler $1 handler
config_get min $1 min
config_get max $1 max
[ "$ACTION" = "$action" -a "$BUTTON" = "$button" -a -n "$handler" ] && {
[ -z "$min" -o -z "$max" ] && eval $handler
[ -n "$min" -a -n "$max" ] && {
[ $min -le $SEEN -a $max -ge $SEEN ] && eval $handler
}
}
}
Code: Select all
config button 'reset_button'
option button 'reset'
option action 'released'
option handler 'logger restore defaults ; /sbin/firstboot ; reboot ;'
option min '3'
option max '90'
Re: Modifying reset button action
There's also a config in rc.button
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
https://lantisproject.com/blog
Please be respectful when posting. I do this in my free time on a volunteer basis.
https://lantisproject.com/blog
Re: Modifying reset button action
Thank you that works for me.Lantis wrote:There's also a config in rc.button
Code: Select all
#!/bin/sh
[ "${ACTION}" = "released" ] || exit 0
. /lib/functions.sh
logger "$BUTTON pressed for $SEEN seconds"
if [ "$SEEN" -lt 1 ]
then
echo "REBOOT" > /dev/console
sync
reboot
elif [ "$SEEN" -gt 5 ]
then
echo "FACTORY RESET" > /dev/console
jffs2reset -y && reboot &
fi