[source] base-files: don't setup network in preinit if failsafe is disabled
LEDE Commits
lede-commits at lists.infradead.org
Wed Aug 9 14:20:35 PDT 2017
rmilecki pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/889638c8bf3c88d0acae2b756aa97d6160579b35
commit 889638c8bf3c88d0acae2b756aa97d6160579b35
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Mon Aug 7 11:09:33 2017 +0200
base-files: don't setup network in preinit if failsafe is disabled
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.
A side effect of this is avoiding a possibly incorrect network config
(only with failsafe disabled). This problem is related to possible
changes made by user in /etc/config/network.
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 a30bf34..7a97a8d 100644
--- a/package/base-files/files/lib/preinit/10_indicate_preinit
+++ b/package/base-files/files/lib/preinit/10_indicate_preinit
@@ -96,6 +96,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
@@ -107,6 +109,8 @@ preinit_ip() {
elif [ -d "/etc/board.d/" ]; then
preinit_config_board
fi
+
+ preinit_net_echo "Doing Lede Preinit\n"
}
preinit_ip_deconfig() {
@@ -146,7 +150,6 @@ preinit_echo() {
}
pi_indicate_preinit() {
- preinit_net_echo "Doing Lede Preinit\n"
set_state preinit
}
More information about the lede-commits
mailing list