[PATCH] configurehood: Leverage -H option for batctl
Adrian Schmutzler
freifunk at adrianschmutzler.de
So Apr 14 22:19:36 CEST 2019
Since batctl can suppress headers, we do not have to count lines.
Cosmetical change.
Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
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
--
2.11.0
Mehr Informationen über die Mailingliste franken-dev