forked from Ivasoft/openwrt
base-files: Allow to disable failsafe mode
Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user