diff options
author | Jonas Gorski <jonas.gorski@gmail.com> | 2017-06-11 12:50:14 +0200 |
---|---|---|
committer | Jonas Gorski <jonas.gorski@gmail.com> | 2017-06-11 12:50:14 +0200 |
commit | fd952c7a83e5357f5dcab28c0bcaca756e27eaa0 (patch) | |
tree | 8478e26885f7374c670557149c2297b64ded8a97 /package/base-files | |
parent | b43c190079eb32eb19e1ba7d550c420933c182ad (diff) | |
download | mtk-20170518-fd952c7a83e5357f5dcab28c0bcaca756e27eaa0.zip mtk-20170518-fd952c7a83e5357f5dcab28c0bcaca756e27eaa0.tar.gz mtk-20170518-fd952c7a83e5357f5dcab28c0bcaca756e27eaa0.tar.bz2 |
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>
Diffstat (limited to 'package/base-files')
-rw-r--r-- | package/base-files/files/lib/preinit/10_indicate_preinit | 5 |
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 a30bf34..43bd04d 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 |