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)
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