From f5872dd84b7634b35a67044618f56b9fdf7fa410 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sat, 1 Aug 2020 01:28:34 +0200 Subject: [PATCH] fff-hoods: fix/simplify condition in configurehood MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 e166666..c9ade0d 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 99f0fce..d07b012 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