Browse Source

set bssid based on hwaddr

Danja Vasiliev 10 years ago
parent
commit
f91180c3f9

+ 4 - 0
openwrt/dir505/etc/12-fstab

@@ -0,0 +1,4 @@
+[ -e /etc/config/fstab ] && [ -z $(find /etc/rc.d/ -name 'S??fstab') ] && ( 
+  /etc/init.d/fstab enable
+  /etc/init.d/fstab start
+  )

+ 5 - 0
openwrt/dir505/etc/rc.local

@@ -16,6 +16,11 @@ mountpoint -q $_SG && (
     chown httpd $_SG/index.html
     )
 
+  ## check symlinking
+  for i in devTools resources templates; do
+    [ -L $_SG/$i ] || ln -s /www/lib/$i $_SG/$i
+  done
+
   ## if /www/tmp does not exist
   [ -d /www/tmp ] || (
     mkdir /www/tmp && chown httpd /www/tmp

+ 5 - 0
openwrt/dir505/etc/uci-defaults/12-fstab-enable

@@ -0,0 +1,5 @@
+[ -e /etc/config/fstab ] && [ -z $(find /etc/rc.d/ -name 'S??fstab') ] && ( 
+  /etc/init.d/fstab enable
+  /etc/init.d/fstab start
+  )
+

+ 9 - 0
openwrt/dir505/etc/uci-defaults/20-set-ssid

@@ -0,0 +1,9 @@
+_MAC=$(iw wlan0 info | awk 'BEGIN { FS=":" } /addr/ { print $5$6 }')                 
+_MAC="SuperGlue-"$_MAC                                                               
+
+[ $(uci get wireless.@wifi-iface[0].ssid) != $_MAC ] && (
+  uci set wireless.@wifi-iface[0].ssid=$_MAC
+  uci commit
+  )
+
+exit 1

+ 2 - 2
openwrt/dir505/www/lib/resources/index.html

@@ -9,9 +9,9 @@
 		<link rel="stylesheet" href="../resources/default/css/style.css">
 	</head>
 	<body class="space root" data-type="AbsoluteSpace" data-grid-size="29" style="height: 540px; width: 787px; background-color: rgb(153, 151, 161); overflow: visible;"><div class="spaceContent" style="undefined">
-		<div class="space" data-type="GridSpace" data-grid-size="50" style="position: absolute; top: 67px; width: 642px; height: 413px; z-index: 0; margin-left: inherit; left: 115px;"><div class="spaceContent" style="background-image: url(http://www/uploads/site_sketch04.png); overflow: hidden; background-repeat: repeat repeat;">
+		<div class="space" data-type="GridSpace" data-grid-size="50" style="position: absolute; top: 67px; width: 642px; height: 413px; z-index: 0; margin-left: inherit; left: 115px;"><div class="spaceContent" style="overflow: hidden;">
 			<div class="shape" data-type="TextShape" style="position: absolute; left: 400px; top: 50px; width: 150px; height: 100px; z-index: 1; margin-left: 0px;"><div class="shapeContent" style="display: block;"><span style="font-family: 'Courier New';"><b><span style="font-size: 14px;">Welcome to SuperGlue</span></b></span></div></div>
 			<div class="shape" data-type="ImageShape" style="position: absolute; left: 50px; top: 50px; width: 300px; height: 250px; z-index: 0; margin-left: 0px;"><img class="shapeContent" style="undefined" src="/resources/default/img/placeholder.png"></div>
 		</div></div>
 	</div></body>
-</html>
+</html>