aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib/preinit/30_failsafe_wait
Commit message (Collapse)AuthorAgeFilesLines
* treewide: drop shebang from non-executable lib filesAdrian Schmutzler2021-01-291-1/+0
| | | | | | | | | | | | This drops the shebang from another bunch of files in various /lib folders, as these are sourced and the shebang is useless. Fix execute bit in one case, too. This should cover almost all trivial cases now, i.e. where /lib is actually used for library files. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* base-files: replace backticks by $(...)Adrian Schmutzler2020-07-111-1/+1
| | | | | | | | | This replaces deprecated backticks by more versatile $(...) syntax. This does not touch lib/upgrade/nand.sh, as there replacement is not trivial. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* base-files: send informational UDP message each second waitingPaul Fertser2019-12-191-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The preinit network initialisation and failsafe informational message are inherently racy as the interface takes some time to become functional after "ip link set $pi_ifname up" command. Consider this timing: [ 12.002713] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready [ 12.008819] IPv6: ADDRCONF(NETDEV_UP): eth1.1: link is not ready [ 12.118877] random: procd: uninitialized urandom read (4 bytes read) [ 13.068614] eth1: link up (1000Mbps/Full duplex) [ 13.073309] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready [ 13.080445] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.1: link becomes ready Since the UDP message was sent prior to link becoming ready, it was never seen on the wire. The default failsafe timeout is set to 2 seconds, so with this patch there are two attempts to send the message, one spent in vain, and the other visible in tcpdump on an attached host. Of course, in cases when the interface is brought up faster it leads to two messages, however it should be harmless. This patch (almost) doesn't affect normal boot time while still allowing to enter failsafe reliably with a single button press, matching the official "generic failsafe" documentation. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
* base-files: fix several bashismsMichael Heimpold2018-12-051-1/+1
| | | | | | | For equality test a simple = is sufficient, the == is usually disregarded as bashism. Signed-off-by: Michael Heimpold <mhei@heimpold.de>
* base-files: Allow to disable failsafe modeJohn Crispin2016-04-191-1/+5
| | | | Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
* base-files: fix whitespacesLuka Perkov2013-12-091-81/+80
| | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 39006
* base-files: allow users to delect debug level during bootJohn Crispin2013-11-251-8/+17
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 38909
* base-files: be verbose when entering failsafe due to a button being pressedJohn Crispin2013-07-251-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 37535
* procd: make the preinit rules wildcard all buttons for failsafeJohn Crispin2013-06-101-2/+3
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36896
* base-files: fix failsafe via button pressJohn Crispin2013-06-101-1/+1
| | | | | | | | entering failsafe by pressing a button during boot was broken for procd as init Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36891
* preinit: move cmdline failsafe= handling ot the generic codeJohn Crispin2013-04-251-4/+7
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36430
* make basefiles aware of procdJohn Crispin2013-03-131-3/+2
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36003
* base-files: make press key message more explicit in preinitJo-Philipp Wich2010-03-231-1/+1
| | | | SVN-Revision: 20392
* base-files: fix enter failsafe messageFelix Fietkau2010-03-011-1/+0
| | | | SVN-Revision: 19937
* preinit: Remove Ctrl-C prompt...impossible on /dev/console (patch by cshore)Felix Fietkau2010-01-281-1/+1
| | | | SVN-Revision: 19367
* add preinit modularization work by Daniel Dickinson (cshore)Felix Fietkau2010-01-251-0/+86
SVN-Revision: 19331