From 05fb012ae4444d7074ec368f2385533566c7cac9 Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sat, 28 Sep 2013 18:40:37 +0200
Subject: [PATCH] Generate wifi config

---
 package/gluon-core/Makefile                              | 1 +
 .../lib/gluon/upgrade/core/initial/020-wireless}         | 9 +++++----
 2 files changed, 6 insertions(+), 4 deletions(-)
 rename package/gluon-core/{files/lib/gluon/upgrade/core/initial/020-lff-wireless => generate/lib/gluon/upgrade/core/initial/020-wireless} (67%)

diff --git a/package/gluon-core/Makefile b/package/gluon-core/Makefile
index c0979a1b8..ca892ecb2 100644
--- a/package/gluon-core/Makefile
+++ b/package/gluon-core/Makefile
@@ -30,6 +30,7 @@ endef
 
 define Package/gluon-core/install
 	$(CP) ./files/* $(1)/
+	$(GLUON_GENERATE) ./generate/* $(1)/
 endef
 
 $(eval $(call BuildPackage,gluon-core))
diff --git a/package/gluon-core/files/lib/gluon/upgrade/core/initial/020-lff-wireless b/package/gluon-core/generate/lib/gluon/upgrade/core/initial/020-wireless
similarity index 67%
rename from package/gluon-core/files/lib/gluon/upgrade/core/initial/020-lff-wireless
rename to package/gluon-core/generate/lib/gluon/upgrade/core/initial/020-wireless
index 18e9c7cdf..ca9cc329a 100755
--- a/package/gluon-core/files/lib/gluon/upgrade/core/initial/020-lff-wireless
+++ b/package/gluon-core/generate/lib/gluon/upgrade/core/initial/020-wireless
@@ -4,7 +4,7 @@ uci -q batch <<EOF
 delete wireless.radio0.disabled
 delete wireless.@wifi-iface[0]
 
-set wireless.radio0.channel='1'
+set wireless.radio0.channel='@wifi24.channel@'
 set wireless.radio0.htmode='HT40+'
 set wireless.radio0.country='DE'
 
@@ -12,14 +12,15 @@ set wireless.wifi_freifunk='wifi-iface'
 set wireless.wifi_freifunk.device='radio0'
 set wireless.wifi_freifunk.network='freifunk'
 set wireless.wifi_freifunk.mode='ap'
-set wireless.wifi_freifunk.ssid='luebeck.freifunk.net'
+set wireless.wifi_freifunk.ssid='@wifi24.ssid@'
 
 set wireless.wifi_mesh='wifi-iface'
 set wireless.wifi_mesh.device='radio0'
 set wireless.wifi_mesh.network='mesh'
 set wireless.wifi_mesh.mode='adhoc'
-set wireless.wifi_mesh.ssid='02:d1:11:37:fc:38'
-set wireless.wifi_mesh.bssid='02:d1:11:37:fc:38'
+set wireless.wifi_mesh.ssid='@wifi24.mesh_ssid@'
+set wireless.wifi_mesh.bssid='@wifi24.mesh_bssid@'
+set wireless.wifi_mesh.mcast_rate='12000'
 
 commit wireless
 EOF
-- 
GitLab