--- package/base-files/Makefile | 1 + .../base-files/files/lib/preinit/30_failsafe_wait | 10 ++++++---- package/base-files/image-config.in | 13 ++++++++++--- 3 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 61a109c..95444df 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -64,6 +64,7 @@ define ImageConfigOptions echo 'pi_init_env=$(if $(CONFIG_TARGET_INIT_ENV),$(CONFIG_TARGET_INIT_ENV),"")' >>$(1)/lib/preinit/00_preinit.conf echo 'pi_init_cmd=$(if $(CONFIG_TARGET_INIT_CMD),$(CONFIG_TARGET_INIT_CMD),"/sbin/init")' >>$(1)/lib/preinit/00_preinit.conf echo 'pi_init_suppress_stderr="$(CONFIG_TARGET_INIT_SUPPRESS_STDERR)"' >>$(1)/lib/preinit/00_preinit.conf + echo 'pi_disable_failsafe="$(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE)"' >>$(1)/lib/preinit/00_preinit.conf echo 'pi_no_network="$(CONFIG_TARGET_PREINIT_NO_NETWORK)"' >>$(1)/lib/preinit/00_preinit.conf echo 'pi_ifname=$(if $(CONFIG_TARGET_PREINIT_IFNAME),$(CONFIG_TARGET_PREINIT_IFNAME),"")' >>$(1)/lib/preinit/00_preinit.conf echo 'pi_ip=$(if $(CONFIG_TARGET_PREINIT_IP),$(CONFIG_TARGET_PREINIT_IP),"192.168.1.1")' >>$(1)/lib/preinit/00_preinit.conf diff --git a/package/base-files/files/lib/preinit/30_failsafe_wait b/package/base-files/files/lib/preinit/30_failsafe_wait index 04dc57d..2275209 100644 --- a/package/base-files/files/lib/preinit/30_failsafe_wait +++ b/package/base-files/files/lib/preinit/30_failsafe_wait @@ -75,10 +75,12 @@ fs_wait_for_key () { failsafe_wait() { FAILSAFE= - pi_failsafe_net_message=true - preinit_net_echo "Please press button now to enter failsafe" - pi_failsafe_net_message=false - fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true && export FAILSAFE + if [ "$pi_disable_failsafe" != "y" ]; then + pi_failsafe_net_message=true + preinit_net_echo "Please press button now to enter failsafe" + pi_failsafe_net_message=false + fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true && export FAILSAFE + fi } boot_hook_add preinit_main failsafe_wait diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in index 021700a..478e895 100644 --- a/package/base-files/image-config.in +++ b/package/base-files/image-config.in @@ -32,6 +32,14 @@ config TARGET_PREINIT_TIMEOUT How long to wait for failsafe mode to be entered before continuing with a regular boot if failsafe not selected. +config TARGET_PREINIT_DISABLE_FAILSAFE + bool + prompt "Disable failsafe mode" if PREINITOPT + default n + help + Remove failsafe mode altogether (that is don't emit failsafe message, and + don't have option to enter failsafe mode, ever) + config TARGET_PREINIT_NO_NETWORK bool prompt "Drop networking from preinit" if PREINITOPT @@ -53,9 +61,8 @@ config TARGET_PREINIT_SHOW_NETMSG config TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG bool - prompt "Suppress network message indicating failsafe" if PREINITOPT - default n if !TARGET_PREINIT_NO_NETWORK - default y if TARGET_PREINIT_NO_NETWORK + prompt "Suppress network message indicating failsafe" if PREINITOPT && !TARGET_PREINIT_NO_NETWORK && !TARGET_PREINIT_DISABLE_FAILSAFE + default n help If "Show all preinit network messages" above is not set, then setting this option suppresses the only message that would be -- 1.7.9.5 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel