mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
Fix omr-update
This commit is contained in:
parent
a45d6a842a
commit
dbd0346a8b
2 changed files with 19 additions and 0 deletions
|
@ -16,6 +16,7 @@ boot() {
|
||||||
[ -n "$files" ] && {
|
[ -n "$files" ] && {
|
||||||
mkdir -p /usr/share/omr-update
|
mkdir -p /usr/share/omr-update
|
||||||
if [ "$(grep rom /etc/mtab)" = "" ]; then
|
if [ "$(grep rom /etc/mtab)" = "" ]; then
|
||||||
|
rm /usr/share/omr-update/*
|
||||||
cp /etc/uci-defaults/* /usr/share/omr-update
|
cp /etc/uci-defaults/* /usr/share/omr-update
|
||||||
fi
|
fi
|
||||||
uci -q set openmptcprouter.settings=settings
|
uci -q set openmptcprouter.settings=settings
|
||||||
|
|
18
openmptcprouter/files/etc/uci-defaults/000-omr-update
Executable file
18
openmptcprouter/files/etc/uci-defaults/000-omr-update
Executable 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
|
Loading…
Reference in a new issue