From patchwork Fri Jul 31 23:28:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [2/2] fff-hoods: fix/simplify condition in configurehood From: Adrian Schmutzler X-Patchwork-Id: 1411 Message-Id: <20200731232834.19763-2-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Sat, 1 Aug 2020 01:28:34 +0200 What was intended as grouping of logic operators actually invoked a subshell. Remove the subshell by using a better choice of operators. Found by shellcheck. Signed-off-by: Adrian Schmutzler Reviewed-by: Fabian Bläse --- src/packages/fff/fff-hoods/Makefile | 2 +- src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/packages/fff/fff-hoods/Makefile b/src/packages/fff/fff-hoods/Makefile index e166666a..c9ade0d0 100644 --- a/src/packages/fff/fff-hoods/Makefile +++ b/src/packages/fff/fff-hoods/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fff-hoods -PKG_RELEASE:=14 +PKG_RELEASE:=15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood index 99f0fce4..d07b0125 100755 --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood @@ -106,7 +106,7 @@ if [ -s "$hoodfiletmp" ]; then json_select ".." # back to root - if ! ([ -n "$chan2ghz" ] && [ -n "$chan5ghz" ]) ; then + if [ -z "$chan2ghz" ] || [ -z "$chan5ghz" ] ; then # If channel is missing, do nothing exit 0 fi