mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add and check version for config update
This commit is contained in:
parent
35cfb38b6f
commit
c901cf07bc
1 changed files with 11 additions and 9 deletions
|
@ -14,15 +14,17 @@ boot() {
|
||||||
cp /etc/uci-defaults/* /usr/share/omr-update
|
cp /etc/uci-defaults/* /usr/share/omr-update
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
source /etc/os-release
|
||||||
cd /usr/share/omr-update || return 0
|
if [ "$(uci -q get openmptcprouter.settings.version)" != "${VERSION}" ]; then
|
||||||
files="$(ls)"
|
cd /usr/share/omr-update || return 0
|
||||||
[ -z "$files" ] && return 0
|
files="$(ls)"
|
||||||
for file in $files; do
|
[ -z "$files" ] && return 0
|
||||||
( . "./$(basename $file)" )
|
for file in $files; do
|
||||||
done
|
( . "./$(basename $file)" )
|
||||||
uci commit
|
done
|
||||||
|
uci -q set openmptcprouter.settings.version=${VERSION}
|
||||||
|
uci commit
|
||||||
|
fi
|
||||||
# temporary hack until configd exists
|
# temporary hack until configd exists
|
||||||
/sbin/reload_config
|
/sbin/reload_config
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue