mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
34 lines
808 B
Bash
Executable file
34 lines
808 B
Bash
Executable file
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2006-2011 OpenWrt.org
|
|
|
|
START=09
|
|
STOP=98
|
|
|
|
boot() {
|
|
. /lib/functions/system.sh
|
|
|
|
cd /etc/uci-defaults || return 0
|
|
source /etc/os-release
|
|
|
|
files="$(ls)"
|
|
[ -n "$files" ] && {
|
|
mkdir -p /usr/share/omr-update
|
|
if [ "$(grep rom /etc/mtab)" = "" ]; then
|
|
cp /etc/uci-defaults/* /usr/share/omr-update
|
|
fi
|
|
uci -q set openmptcprouter.settings.version=${VERSION}
|
|
return 0
|
|
}
|
|
if [ "$(uci -q get openmptcprouter.settings.version)" != "${VERSION}" ]; then
|
|
cd /rom/etc/uci-defaults || 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
|
|
}
|