modules/freifunk: migrate /etc/config/freifunk to the new format if it was restored by sysupgrade
This commit is contained in:
parent
e98e960954
commit
8eb738326c
1 changed files with 11 additions and 1 deletions
|
@ -6,7 +6,7 @@ _log() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_uci() {
|
_uci() {
|
||||||
uci get "$1" 2>/dev/null
|
uci ${2:+-c $2} get "$1" 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,3 +39,13 @@ done
|
||||||
uci commit olsrd
|
uci commit olsrd
|
||||||
/etc/init.d/olsrd restart
|
/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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue