From 43652000d7c9a5b321f182d6c70bc593221ea3e9 Mon Sep 17 00:00:00 2001
From: MrMM <mm@freifunk-aachen.de>
Date: Tue, 6 Oct 2015 10:12:59 +0200
Subject: [PATCH] Fixed generation of ssid when the nodename is short

---
 files/lib/gluon/ssid-changer/ssid-changer.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/files/lib/gluon/ssid-changer/ssid-changer.sh b/files/lib/gluon/ssid-changer/ssid-changer.sh
index ab74733..281a158 100755
--- a/files/lib/gluon/ssid-changer/ssid-changer.sh
+++ b/files/lib/gluon/ssid-changer/ssid-changer.sh
@@ -7,12 +7,12 @@ OFFLINE_PREFIX='FF_OFFLINE_' # Use something short to leave space for the nodena
 
 # Generate an Offline SSID with the first and last Part of the nodename to allow owner to recognise wich node is down
 NODENAME=`uname -n`
-if [ ${#NODENAME} > 30-${#OFFLINE_PREFIX} ] ; then #32 would be possible as well
+if [ ${#NODENAME} > $(30-${#OFFLINE_PREFIX}) ] ; then #32 would be possible as well
 	HALF=$(( (28 - ${#OFFLINE_PREFIX} ) / 2 ))
 	SKIP=$(( ${#NODENAME} - $HALF ))
 	OFFLINE_SSID=$OFFLINE_PREFIX${NODENAME:0:$HALF}...${NODENAME:$SKIP:${#NODENAME}} # use the first and last part of the nodename for nodes with long name
 else
-	OFFLINE_SSID=`$OFFLINE_PREFIX$NODENAME`
+	OFFLINE_SSID="$OFFLINE_PREFIX$NODENAME"
 fi
 
 #Is there an active Gateway?
-- 
GitLab