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

Merge pull request #196 from Ysurac/develop

sync
This commit is contained in:
suyuan 2021-12-27 01:43:33 +08:00 committed by GitHub
commit b74854f4f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 5 deletions

View file

@ -539,7 +539,7 @@ _intf_rule() {
EOF EOF
else else
ip rule add prio 1 fwmark 0x539$count lookup $count pref 1 > /dev/null 2>&1 ip rule add prio 1 fwmark 0x539$count lookup $count pref 1 > /dev/null 2>&1
ip -6 rule add prio 1 fwmark 0x6539$count lookup 6$count > /dev/null 2>&1 ip -6 rule add prio 1 fwmark 0x6539$count lookup 6$count pref 1 > /dev/null 2>&1
fi fi
} }
if [ "$(iptables-save | grep omr-bypass | grep omr_dst_bypass_$intf)" = "" ]; then if [ "$(iptables-save | grep omr-bypass | grep omr_dst_bypass_$intf)" = "" ]; then

View file

@ -19,10 +19,10 @@ config_get lan_device lan ifname
config_load dscp config_load dscp
_ipt4() { _ipt4() {
iptables -w -t mangle "$@" iptables -w -t mangle "$@" 2>&1 >/dev/null
} }
_ipt6() { _ipt6() {
ip6tables -w -t mangle "$@" ip6tables -w -t mangle "$@" >/dev/null
} }
_add_dscp_rule() { _add_dscp_rule() {

View file

@ -24,5 +24,11 @@ fi
uci -q set openmptcprouter.settings.scaling_governor='performance' uci -q set openmptcprouter.settings.scaling_governor='performance'
uci -q commit openmptcprouter uci -q commit openmptcprouter
} }
[ -n "$(ubus call system board | jsonfilter -e '@.board_name' | grep wrt)" ] && [ "$(uci -q get system.@system[0].compat_version)" == "" ] && {
uci -q batch <<-EOF >/dev/null
set system.@system[-1].compat_version='1.1'
commit system
EOF
}
exit 0 exit 0

View file

@ -4,9 +4,9 @@ if [ "$(grep usbmode /etc/rc.local)" = "" ]; then
sed -i 's:exit 0::g' /etc/rc.local sed -i 's:exit 0::g' /etc/rc.local
cat <<-EOF >> /etc/rc.local cat <<-EOF >> /etc/rc.local
/bin/sleep 5 /bin/sleep 5
/sbin/usbmode -l /sbin/usbmode -l 2>&1 /dev/null
/bin/sleep 3 /bin/sleep 3
/sbin/usbmode -s /sbin/usbmode -s 2>&1 /dev/null
exit 0 exit 0
EOF EOF
fi fi