From f468598596511fba6beca65cf4d15db6eeace35a Mon Sep 17 00:00:00 2001
From: Bjoern Franke <bjo@nord-west.org>
Date: Tue, 8 Apr 2014 03:02:51 +0200
Subject: [PATCH] nodewatcher: add dep on bridge-utils (busybox-brctl does not
 have showstp) nodewatcher: fix symbolic link creation for node.data

---
 nodewatcher/Makefile                                  | 1 +
 nodewatcher/files/lib/ffol/nodewatcher/nodewatcher.sh | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/nodewatcher/Makefile b/nodewatcher/Makefile
index 303258a..6e3f5db 100644
--- a/nodewatcher/Makefile
+++ b/nodewatcher/Makefile
@@ -12,6 +12,7 @@ define Package/ffol-nodewatcher
   SECTION:=daemon
   CATEGORY:=Freifunk Oldenburg
   TITLE:=Provides status data for netmon 
+  DEPENDS:=+bridge-utils
 endef
 
 define Package/ffol-nodewatcher/description
diff --git a/nodewatcher/files/lib/ffol/nodewatcher/nodewatcher.sh b/nodewatcher/files/lib/ffol/nodewatcher/nodewatcher.sh
index b86eefd..9131c3f 100755
--- a/nodewatcher/files/lib/ffol/nodewatcher/nodewatcher.sh
+++ b/nodewatcher/files/lib/ffol/nodewatcher/nodewatcher.sh
@@ -202,7 +202,7 @@ crawl() {
 	#write data to hxml file that provides the data on httpd
 	echo $DATA > $SCRIPT_DATA_FILE
 	#symlink nodewatcher-data in gluon-statuspage-docroot
-	if [ -f /lib/gluon/status-page/www/node.data ]; then
+	if [ ! -h /lib/gluon/status-page/www/node.data ]; then
 		ln -s $SCRIPT_DATA_FILE /lib/gluon/status-page/www/node.data
 	fi
 }
-- 
GitLab