mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
netmode: 1.1.8
This commit is contained in:
parent
64cf5c7c9f
commit
924675d271
3 changed files with 10 additions and 3 deletions
|
|
@ -8,7 +8,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=netmode
|
||||
PKG_VERSION:=1.1.7
|
||||
PKG_VERSION:=1.1.8
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
|
|
|
|||
|
|
@ -4,13 +4,19 @@ enabled="$(uci -q get netmode.global.enabled)"
|
|||
[ "$enabled" == "1" ] || exit 0
|
||||
|
||||
mode="$(uci -q get netmode.global.mode)"
|
||||
[ -n "$mode" ] && exit 0
|
||||
wanproto=$(uci -q get network.wan.proto)
|
||||
|
||||
if [ -n "$mode" ]; then
|
||||
# check if wanproto and mode aligned
|
||||
if [ "${mode}" = "routed-${wanproto}" ]; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
[ -f /etc/netmodes/supported_modes.json ] || exit 0
|
||||
|
||||
# NetMode is enabled without a Mode being set
|
||||
# Figure out the current mode from network config
|
||||
wanproto=$(uci -q get network.wan.proto)
|
||||
curmode=""
|
||||
case "$wanproto" in
|
||||
dhcp) curmode="routed-dhcp" ;;
|
||||
|
|
|
|||
1
netmode/files/lib/upgrade/keep.d/netmode
Normal file
1
netmode/files/lib/upgrade/keep.d/netmode
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/netmodes/.last_mode
|
||||
Loading…
Add table
Reference in a new issue