git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
e98e960
)
modules/freifunk: migrate /etc/config/freifunk to the new format if it was restored...
author
Jo-Philipp Wich
<redacted>
Thu, 17 Sep 2009 11:12:01 +0000
(11:12 +0000)
committer
Jo-Philipp Wich
<redacted>
Thu, 17 Sep 2009 11:12:01 +0000
(11:12 +0000)
modules/freifunk/root/etc/rc.local.d/01-config-migration
patch
|
blob
|
history
diff --git
a/modules/freifunk/root/etc/rc.local.d/01-config-migration
b/modules/freifunk/root/etc/rc.local.d/01-config-migration
index 1ab7239c862e565b0c917d1622135d7e094a68d1..11f1ad60bc1c3e0d56d879da8e9ffaf5cbe2614b 100644
(file)
--- a/
modules/freifunk/root/etc/rc.local.d/01-config-migration
+++ b/
modules/freifunk/root/etc/rc.local.d/01-config-migration
@@
-6,7
+6,7
@@
_log() {
}
_uci() {
- uci get "$1" 2>/dev/null
+ uci
${2:+-c $2}
get "$1" 2>/dev/null
}
@@
-39,3
+39,13
@@
done
uci commit olsrd
/etc/init.d/olsrd restart
}
+
+
+# Ensure that the community definitions are in the
+# new format
+
+[ -z "$(_uci freifunk.leipzig.mesh_network)" ] && \
+[ -n "$(_uci freifunk.leipzig.mesh_network /rom/etc/config)" ] && {
+ _log "Converting freifunk configuration to new format"
+ cp /rom/etc/config/freifunk /etc/config/freifunk
+}
git clone https://git.99rst.org/PROJECT