1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 10:31:51 +00:00

Fix omr-update

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-01-04 11:00:19 +01:00
parent 2960b6b5d7
commit 517b93f436
2 changed files with 19 additions and 0 deletions

View file

@ -16,6 +16,7 @@ boot() {
[ -n "$files" ] && {
mkdir -p /usr/share/omr-update
if [ "$(grep rom /etc/mtab)" = "" ]; then
rm /usr/share/omr-update/*
cp /etc/uci-defaults/* /usr/share/omr-update
fi
uci -q set openmptcprouter.settings=settings

View file

@ -0,0 +1,18 @@
#!/bin/sh
cd /etc/uci-defaults || exit 0
source /etc/os-release
OMRVERSION=$(echo $VERSION | sed 's/v//')
files="$(ls /etc/uci-defaults/)"
[ -n "$files" ] && {
mkdir -p /usr/share/omr-update
if [ "$(grep rom /etc/mtab)" = "" ]; then
rm /usr/share/omr-update/*
cp /etc/uci-defaults/* /usr/share/omr-update
fi
uci -q set openmptcprouter.settings=settings
uci -q set openmptcprouter.settings.version=${OMRVERSION}
uci -q commit
}
exit 0