diff --git a/omr-update/files/etc/init.d/omr-update b/omr-update/files/etc/init.d/omr-update index 3c8f7944e..666bc05c2 100755 --- a/omr-update/files/etc/init.d/omr-update +++ b/omr-update/files/etc/init.d/omr-update @@ -14,15 +14,17 @@ boot() { cp /etc/uci-defaults/* /usr/share/omr-update return 0 } - - cd /usr/share/omr-update || return 0 - files="$(ls)" - [ -z "$files" ] && return 0 - for file in $files; do - ( . "./$(basename $file)" ) - done - uci commit - + source /etc/os-release + if [ "$(uci -q get openmptcprouter.settings.version)" != "${VERSION}" ]; then + cd /usr/share/omr-update || return 0 + files="$(ls)" + [ -z "$files" ] && return 0 + for file in $files; do + ( . "./$(basename $file)" ) + done + uci -q set openmptcprouter.settings.version=${VERSION} + uci commit + fi # temporary hack until configd exists /sbin/reload_config }