Topic: how long is the time window for openwrt failsafe mode?

I know I saw that info in one of the configs but I dont remember it or where.

Re: how long is the time window for openwrt failsafe mode?

http://wiki.openwrt.org/doc/techref/preinit_mount#variables

fs_failsafe_wait_timeout     How long to pause while allowing the user to choose to enter failsafe mode. Default is two (2) seconds.

set in:

https://dev.openwrt.org/browser/trunk/package/base-files/files/etc/preinit

Re: how long is the time window for openwrt failsafe mode?

thx

Re: how long is the time window for openwrt failsafe mode?

The failsafe function wait is do in this file:
https://dev.openwrt.org/browser/trunk/package/base-files/files/lib/preinit/30_failsafe_wait

This is the releated code for push a button to enter failsafe mode:

trap "echo 'true' >$keypress_true; lock -u $keypress_wait ; rm -f $keypress_wait" USR1

we need to care who send the USR1 signal which let's us enter failsafe mode.

The button driver is in linux kernel space,it's need do something to let the user space know,so before the failsafe wait,it's will "insmod gpio-button-hotplug" and start the "hotplug2",you can read the:
https://dev.openwrt.org/browser/trunk/package/base-files/files/lib/preinit/30_device_fs_daemons
This line:

/sbin/hotplug2 --set-worker /lib/hotplug2/worker_fork.so --set-rules-file /etc/hotplug2-init.rules --no-persistent --set-coldplug-cmd /sbin/udevtrigger
/sbin/hotplug2 --set-worker /lib/hotplug2/worker_fork.so --set-rules-file /etc/hotplug2-init.rules --persistent &

Refer the "--set-rules-file" option,you need see the file:
https://dev.openwrt.org/browser/trunk/package/base-files/files/etc/hotplug2-init.rules

3    SUBSYSTEM == button {
4            exec kill -USR1 1
5    }

So the USR1 sginal is come from here,this is why you can push button and go failsafe mode.
The failsafe wait time loop is also in this  file:
https://dev.openwrt.org/browser/trunk/package/base-files/files/lib/preinit/30_failsafe_wait

If you want to know the detail,you can read it.