1 # Fixup various configurations to remove quirks
2 # from former versions.
5 logger -t "Config Migration" "$1"
9 uci ${2:+-c $2} get "$1" 2>/dev/null
13 # Splash redirector had a wrong virtual url match
14 # which resulted in "No such handler"
16 [ "$(_uci lucid.splashredir.virtual)" == "/" ] && {
17 _log "Fix splash redirector configuration"
18 uci set lucid.splashredir.virtual=''
20 /etc/init.d/lucid restart
24 # Newer OLSR versions have the MinTCVtime hack active,
25 # ensure proper timings or olsrd won't start
28 for i in 0 1 2 3 4; do
29 [ -z "$(_uci olsrd.@Interface[$i].TcInterval)" ] && \
30 [ -z "$(_uci olsrd.@Interface[$i].TcValidityTime)" ] || {
31 uci delete olsrd.@Interface[$i].TcInterval
32 uci delete olsrd.@Interface[$i].TcValidityTime
38 _log "Fix olsrd configuration for MinTCVTime hack"
40 /etc/init.d/olsrd restart
44 # Ensure that the community definitions are in the
47 [ -z "$(_uci freifunk.leipzig.mesh_network)" ] && \
48 [ -n "$(_uci freifunk.leipzig.mesh_network /rom/etc/config)" ] && {
49 _log "Converting freifunk configuration to new format"
50 cp /rom/etc/config/freifunk /etc/config/freifunk