configurehood: Leverage -H option for batctl

Since batctl can suppress headers, we do not have to count lines.

Cosmetical change.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
This commit is contained in:
Adrian Schmutzler 2019-04-14 22:19:36 +02:00
parent 518c0d6fef
commit d9371a7a22
1 changed files with 1 additions and 1 deletions

View File

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