From patchwork Sun Apr 14 20:19:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: configurehood: Leverage -H option for batctl From: Adrian Schmutzler X-Patchwork-Id: 1065 Message-Id: <20190414201936.1769-1-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Sun, 14 Apr 2019 22:19:36 +0200 Since batctl can suppress headers, we do not have to count lines. Cosmetical change. Signed-off-by: Adrian Schmutzler Reviewed-by: Fabian Bläse Reviewed-by: Robert Langhammer --- src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood index 15f08550..c3b56b3e 100755 --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood @@ -22,7 +22,7 @@ rm -f "$hoodfiletmp" # Gatewaycheck function isGatewayAvailable() { - if [ "$(batctl gwl | wc -l)" -gt 2 ]; then + if [ -n "$(batctl gwl -H)" ]; then return 0 else return 1