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

Fix IP reset

This commit is contained in:
Ycarus 2018-06-15 20:52:54 +02:00
parent 6a2156afd3
commit 65f9e51e31
3 changed files with 11 additions and 5 deletions

View file

@ -8,15 +8,17 @@ 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
}
source /etc/os-release
if [ "$(uci -q get openmptcprouter.settings.version)" != "${VERSION}" ]; then
cd /rom/etc/uci-defaults || cd /usr/share/omr-update || return 0
files="$(ls)"

View file

@ -49,7 +49,11 @@ _setup_wan_interface() {
[ -n "$4" ] && uci -q set network.$1.type=$4
}
uci -q batch <<EOF
if [ "$(uci -q get openmptcprouter.settings.version)" != "" ]; then
exit 0
fi
uci -q batch <<-EOF
set network.lan=interface
set network.lan.proto=static
set network.lan.ipaddr=192.168.100.1
@ -57,7 +61,7 @@ set network.lan.netmask=255.255.255.0
set network.lan.ifname=eth0
EOF
uci -q batch <<EOF
uci -q batch <<-EOF
delete network.none
delete network.if6rd
reorder network.loopback=0
@ -83,7 +87,7 @@ config_foreach _setup_multipath_off interface
# Add the lan as a named routing table
if ! grep -s -q "lan" /etc/iproute2/rt_tables; then
echo "50 lan" >> /etc/iproute2/rt_tables
echo "50 lan" >> /etc/iproute2/rt_tables
fi
uci -q set network.lan.ip4table='lan'

View file

@ -21,7 +21,7 @@ if [ "$NBCPU" -gt 2 ]; then
fi
fi
if [ "$(uci -q get shadowsocks-libev.hi.timeout)" = "200" ]; then
if [ "$(uci -q get shadowsocks-libev.hi.timeout)" != "200" ]; then
uci -q batch <<-EOF > /dev/null
set shadowsocks-libev.hi.timeout=200
commit shadowsocks-libev