aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Gorski <jonas.gorski@gmail.com>2017-06-11 12:50:14 +0200
committerJo-Philipp Wich <jo@mein.io>2017-12-13 15:58:35 +0100
commit9c3e4b54343b85cc24cf231a7a863ffafeb1f287 (patch)
tree664ffe2405cce877202624c2631a719b51ba0076
parent7d1f4073ce8085fa1c6bf81ddfa2e9b5cb1cc330 (diff)
downloadupstream-9c3e4b54343b85cc24cf231a7a863ffafeb1f287.tar.gz
upstream-9c3e4b54343b85cc24cf231a7a863ffafeb1f287.tar.bz2
upstream-9c3e4b54343b85cc24cf231a7a863ffafeb1f287.zip
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@gmail.com> (cherry picked from commit fd952c7a83e5357f5dcab28c0bcaca756e27eaa0)
-rw-r--r--package/base-files/files/lib/preinit/10_indicate_preinit5
1 files changed, 4 insertions, 1 deletions
diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit
index 7a97a8dd0f..2c1a63f66f 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