[source] base-files: board.json's switch reset means existence, not argument

LEDE Commits lede-commits at lists.infradead.org
Thu Dec 14 09:44:36 PST 2017


jow pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/9c3e4b54343b85cc24cf231a7a863ffafeb1f287

commit 9c3e4b54343b85cc24cf231a7a863ffafeb1f287
Author: Jonas Gorski <jonas.gorski at gmail.com>
AuthorDate: Sun Jun 11 12:50:14 2017 +0200

    base-files: board.json's switch reset means existence, not argument
    
    Don't pass the value unconditionally to swconfig as a parameter but
    instead only call reset if it is 1.
    
    Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
    (cherry picked from commit fd952c7a83e5357f5dcab28c0bcaca756e27eaa0)
---
 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 7a97a8d..2c1a63f 100644
--- a/package/base-files/files/lib/preinit/10_indicate_preinit
+++ b/package/base-files/files/lib/preinit/10_indicate_preinit
@@ -43,7 +43,10 @@ preinit_config_switch() {
 			json_select ..
 
 			if [ "$device" = "$lan_if" ]; then
-				swconfig dev $name set reset $reset
+				if [ "$reset" -eq "1" ]; then
+					swconfig dev $name set reset
+				fi
+
 				swconfig dev $name set enable_vlan $enable
 				swconfig dev $name vlan $role set ports "$ports"
 				swconfig dev $name set apply



More information about the lede-commits mailing list