From patchwork Fri Apr 17 13:51:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: fff-gateway: make uci query for vlan ports quiet From: Fabian Blaese X-Patchwork-Id: 1345 Message-Id: <20200417135148.64669-1-fabian@blaese.de> To: franken-dev@freifunk.net Date: Fri, 17 Apr 2020 15:51:48 +0200 The user might create a vlan without any ports. This setup lead to "uci: Entry not found" error messages, while still working as intended. The '-q' flag is added to the corresponding uci query to hide this error. While this isn't strictly necessary, the uci subcommand is quoted to bring it in line with the other subcommands. Signed-off-by: Fabian Bläse Reviewed-by: Adrian Schmutzler --- src/packages/fff/fff-gateway/files/etc/gateway.d/20-vlan | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/fff/fff-gateway/files/etc/gateway.d/20-vlan b/src/packages/fff/fff-gateway/files/etc/gateway.d/20-vlan index cfc8e69..a46bcd5 100644 --- a/src/packages/fff/fff-gateway/files/etc/gateway.d/20-vlan +++ b/src/packages/fff/fff-gateway/files/etc/gateway.d/20-vlan @@ -10,7 +10,7 @@ BOARD="$(uci get board.model.name)" configure() { add_vlan() { local vlan="$1" - local ports=$(uci get gateway.$vlan.ports) + local ports="$(uci -q get gateway.$vlan.ports)" local name="$SWITCHDEV"_$vlan uci set network.$name='switch_vlan'