[LEDE-DEV] [PATCH] base-files: don't setup network in preinit if failsafe is disabled
Rafał Miłecki
zajec5 at gmail.com
Mon Aug 7 02:09:33 PDT 2017
From: Rafał Miłecki <rafal at milecki.pl>
With failsafe disabled there is no point in early network setup. We
don't send announcement over UDP and there is no way to ssh to the
device.
Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
package/base-files/files/lib/preinit/10_indicate_preinit | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit
index 666f9aa860..5442a749b1 100644
--- a/package/base-files/files/lib/preinit/10_indicate_preinit
+++ b/package/base-files/files/lib/preinit/10_indicate_preinit
@@ -99,6 +99,8 @@ preinit_config_board() {
}
preinit_ip() {
+ [ "$pi_preinit_no_failsafe" = "y" ] && return
+
# if the preinit interface isn't specified and ifname is set in
# preinit.arch use that interface
if [ -z "$pi_ifname" ]; then
@@ -110,6 +112,8 @@ preinit_ip() {
elif [ -d "/etc/board.d/" ]; then
preinit_config_board
fi
+
+ preinit_net_echo "Doing Lede Preinit\n"
}
preinit_ip_deconfig() {
@@ -144,7 +148,6 @@ preinit_net_echo() {
}
pi_indicate_preinit() {
- preinit_net_echo "Doing Lede Preinit\n"
set_state preinit
}
--
2.11.0
More information about the Lede-dev
mailing list