projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d7a4505
)
contrib/meshwizard: Allow setting system config values via the community profiles
author
Manuel Munz
<freifunk@somakoma.de>
Mon, 4 Jul 2011 22:45:10 +0000
(22:45 +0000)
committer
Manuel Munz
<freifunk@somakoma.de>
Mon, 4 Jul 2011 22:45:10 +0000
(22:45 +0000)
contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_system.sh
[new file with mode: 0755]
patch
|
blob
contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh
patch
|
blob
|
history
modules/freifunk/root/etc/config/freifunk
patch
|
blob
|
history
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_system.sh
b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_system.sh
new file mode 100755
(executable)
index 0000000..
d6b30e3
--- /dev/null
+++ b/
contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_system.sh
@@ -0,0
+1,12
@@
+#!/bin/sh
+# Sets values from /etc/config/freifunk and/or the community profile in /etc/config/system
+
+if [ -n "$(env | grep '^system_')" ]; then
+ echo "++++ Setup system"
+ env | grep "^system_" | sed "s/system_/uci set system.system./g" | while read line; do
+ eval $line
+ echo " $line"
+ done
+fi
+
+uci commit system
diff --git
a/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh
b/contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh
index
547f44a
..
d6d7fb7
100755
(executable)
--- a/
contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh
+++ b/
contrib/package/meshwizard/files/usr/bin/meshwizard/wizard.sh
@@
-32,7
+32,7
@@
export networks
[ -z "$networks" ] && echo "Error: No networks to setup could be found in /etc/config/meshwizard, aborting now." && exit 1
[ -z "$networks" ] && echo "Error: No networks to setup could be found in /etc/config/meshwizard, aborting now." && exit 1
-echo "+++ wizard 0.0.
1
+++
+echo "+++ wizard 0.0.
2
+++
Community=$community
Network(s)=$networks"
Community=$community
Network(s)=$networks"
@@
-49,6
+49,9
@@
done < /tmp/meshwizard.tmp
echo "++++ dnsmasq config"
$dir/helpers/setup_dnsmasq.sh
echo "++++ dnsmasq config"
$dir/helpers/setup_dnsmasq.sh
+# system
+ $dir/helpers/setup_system.sh
+
# Configure found networks
for net in $networks; do
# Configure found networks
for net in $networks; do
@@
-87,12
+90,6
@@
for net in $networks; do
echo " Configuration of $net finished."
done
echo " Configuration of $net finished."
done
-##### Restart services
-#services="network olsrd dnsmasq luci_splash"
-#echo " Restarting services:"
-#for s in $services; do
-# /etc/init.d/$s restart >/dev/null 2>&1
-# echo " * $s"
-#done
+##### Reboot the router (because simply restarting services gave errors)
reboot
reboot
diff --git
a/modules/freifunk/root/etc/config/freifunk
b/modules/freifunk/root/etc/config/freifunk
index
e69662c
..
356f4d1
100644
(file)
--- a/
modules/freifunk/root/etc/config/freifunk
+++ b/
modules/freifunk/root/etc/config/freifunk
@@
-85,6
+85,10
@@
config 'fw_forwarding' 'fffwd'
option 'src' 'freifunk'
option 'dest' 'freifunk'
option 'src' 'freifunk'
option 'dest' 'freifunk'
+config 'defaults' 'system'
+ option 'zonename' 'Europe/Berlin'
+ option 'timezone' 'CET-1CEST,M3.5.0,M10.5.0/3'
+
config 'defaults' 'wifi_device'
option 'channel' '1'
option 'diversity' '1'
config 'defaults' 'wifi_device'
option 'channel' '1'
option 'diversity' '1'