1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Add omr-update to update old saved config

This commit is contained in:
Ycarus 2018-06-07 16:54:41 +02:00
parent 05b516fd5f
commit 19a321c2fe
2 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,28 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org
START=9
STOP=98
boot() {
. /lib/functions/system.sh
cd /etc/uci-defaults || return 0
files="$(ls)"
[ -n "$files" ] && {
mkdir /usr/share/omr-update
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
# temporary hack until configd exists
/sbin/reload_config
}