aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2016-04-19 10:07:35 +0200
committerJohn Crispin <blogic@openwrt.org>2016-04-19 10:07:35 +0200
commitb4e33a1c08f7e0b980b14687ef601bd30634464a (patch)
treeda61b8ddea28f2d2dd93a8ebd6e87802a529be08 /package/base-files/files
parentdc929174095a00150de6a3e48d46355d24f223b9 (diff)
downloadupstream-b4e33a1c08f7e0b980b14687ef601bd30634464a.tar.gz
upstream-b4e33a1c08f7e0b980b14687ef601bd30634464a.tar.bz2
upstream-b4e33a1c08f7e0b980b14687ef601bd30634464a.zip
base-files: Allow to disable failsafe mode
Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
Diffstat (limited to 'package/base-files/files')
-rw-r--r--package/base-files/files/lib/preinit/10_indicate_failsafe1
-rw-r--r--package/base-files/files/lib/preinit/30_failsafe_wait6
-rw-r--r--package/base-files/files/lib/preinit/40_run_failsafe_hook1
3 files changed, 7 insertions, 1 deletions
diff --git a/package/base-files/files/lib/preinit/10_indicate_failsafe b/package/base-files/files/lib/preinit/10_indicate_failsafe
index 6afae410b6..27b94c140f 100644
--- a/package/base-files/files/lib/preinit/10_indicate_failsafe
+++ b/package/base-files/files/lib/preinit/10_indicate_failsafe
@@ -9,6 +9,7 @@ indicate_failsafe_led () {
}
indicate_failsafe() {
+ [ "$pi_preinit_no_failsafe" = "y" ] && return
echo "- failsafe -"
preinit_net_echo "Entering Failsafe!\n"
indicate_failsafe_led
diff --git a/package/base-files/files/lib/preinit/30_failsafe_wait b/package/base-files/files/lib/preinit/30_failsafe_wait
index 3d69baf3a4..9a34f2de4c 100644
--- a/package/base-files/files/lib/preinit/30_failsafe_wait
+++ b/package/base-files/files/lib/preinit/30_failsafe_wait
@@ -39,7 +39,7 @@ fs_wait_for_key () {
rm -f $keypress_wait
} &
- echo "Press the [$1] key and hit [enter] $2"
+ [ "$pi_preinit_no_failsafe" != "y" ] && echo "Press the [$1] key and hit [enter] $2"
echo "Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level"
# if we're on the console we wait for input
{
@@ -82,6 +82,10 @@ fs_wait_for_key () {
failsafe_wait() {
FAILSAFE=
+ [ "$pi_preinit_no_failsafe" == "y" ] && {
+ fs_wait_for_key "" "" $fs_failsafe_wait_timeout
+ return
+ }
grep -q 'failsafe=' /proc/cmdline && FAILSAFE=true && export FAILSAFE
if [ "$FAILSAFE" != "true" ]; then
pi_failsafe_net_message=true
diff --git a/package/base-files/files/lib/preinit/40_run_failsafe_hook b/package/base-files/files/lib/preinit/40_run_failsafe_hook
index cb43ad39cb..7301f77349 100644
--- a/package/base-files/files/lib/preinit/40_run_failsafe_hook
+++ b/package/base-files/files/lib/preinit/40_run_failsafe_hook
@@ -3,6 +3,7 @@
# Copyright (C) 2010 Vertical Communications
run_failsafe_hook() {
+ [ "$pi_preinit_no_failsafe" = "y" ] && return
if [ "$FAILSAFE" = "true" ]; then
boot_run_hook failsafe
lock -w /tmp/.failsafe