更新超级拨号插件
This commit is contained in:
parent
70b49ee185
commit
cee7437154
@ -33,7 +33,7 @@ if device_suggestions then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
apn = s:taboption(Value, "apn", translate("APN"))
|
apn = s:option(Value, "apn", translate("APN"))
|
||||||
apn.default = ""
|
apn.default = ""
|
||||||
apn.rmempty = true
|
apn.rmempty = true
|
||||||
apn:value("", translate("Auto Choose"))
|
apn:value("", translate("Auto Choose"))
|
||||||
@ -43,7 +43,7 @@ apn:value("ctnet", translate("China Telecom"))
|
|||||||
apn:value("cbnet", translate("China Broadcast"))
|
apn:value("cbnet", translate("China Broadcast"))
|
||||||
apn:value("5gscuiot", translate("Skytone"))
|
apn:value("5gscuiot", translate("Skytone"))
|
||||||
|
|
||||||
auth = s:taboption("advanced", ListValue, "auth", translate("Authentication Type"))
|
auth = s:option(ListValue, "auth", translate("Authentication Type"))
|
||||||
auth.default = "none"
|
auth.default = "none"
|
||||||
auth.rmempty = false
|
auth.rmempty = false
|
||||||
auth:value("none", translate("NONE"))
|
auth:value("none", translate("NONE"))
|
||||||
@ -51,13 +51,13 @@ auth:value("both", translate("PAP/CHAP (both)"))
|
|||||||
auth:value("pap", "PAP")
|
auth:value("pap", "PAP")
|
||||||
auth:value("chap", "CHAP")
|
auth:value("chap", "CHAP")
|
||||||
|
|
||||||
username = s:taboption("advanced", Value, "username", translate("PAP/CHAP Username"))
|
username = s:option(Value, "username", translate("PAP/CHAP Username"))
|
||||||
username.rmempty = true
|
username.rmempty = true
|
||||||
username:depends("auth", "both")
|
username:depends("auth", "both")
|
||||||
username:depends("auth", "pap")
|
username:depends("auth", "pap")
|
||||||
username:depends("auth", "chap")
|
username:depends("auth", "chap")
|
||||||
|
|
||||||
password = s:taboption("advanced", Value, "password", translate("PAP/CHAP Password"))
|
password = s:option(Value, "password", translate("PAP/CHAP Password"))
|
||||||
password.rmempty = true
|
password.rmempty = true
|
||||||
password.password = true
|
password.password = true
|
||||||
password:depends("auth", "both")
|
password:depends("auth", "both")
|
||||||
|
@ -12,10 +12,10 @@ source "/usr/share/modem/modem_util.sh"
|
|||||||
#始终确保存在运行目录
|
#始终确保存在运行目录
|
||||||
mkdir -m 0755 -p "${MODEM_RUNDIR}"
|
mkdir -m 0755 -p "${MODEM_RUNDIR}"
|
||||||
|
|
||||||
初始化模组配置
|
#初始化模组配置
|
||||||
[[ "${INTERFACE}" = *"ip6tnl0"* ]] && {
|
# [[ "${INTERFACE}" = *"ip6tnl0"* ]] && {
|
||||||
sh "${SCRIPT_DIR}/modem_init.sh"
|
# sh "${SCRIPT_DIR}/modem_init.sh"
|
||||||
}
|
# }
|
||||||
|
|
||||||
if [[ "${INTERFACE}" = *"usb"* ]] || [[ "${INTERFACE}" = *"wwan"* ]] || [[ "${INTERFACE}" = *"eth"* ]]; then
|
if [[ "${INTERFACE}" = *"usb"* ]] || [[ "${INTERFACE}" = *"wwan"* ]] || [[ "${INTERFACE}" = *"eth"* ]]; then
|
||||||
#配置网络设备
|
#配置网络设备
|
||||||
|
@ -241,10 +241,14 @@ m_set_modem_hardware_config()
|
|||||||
# fi
|
# fi
|
||||||
# }
|
# }
|
||||||
|
|
||||||
#判断路径是否带有usb(排除其他eth网络设备)
|
#是否是第一次添加(初始化模组)
|
||||||
if [ "$data_interface" != "pcie" ] && [[ "$device_physical_path" != *"usb"* ]]; then
|
local count=$(grep -o "processed" ${MODEM_PHYSICAL_DEVICE_CACHE} | wc -l)
|
||||||
return
|
[ "$count" -le "0" ] && {
|
||||||
fi
|
sh "${SCRIPT_DIR}/modem_init.sh"
|
||||||
|
}
|
||||||
|
|
||||||
|
#设置物理路径状态
|
||||||
|
m_set_physical_path_status "${physical_path}" "processed"
|
||||||
|
|
||||||
#获取模组序号
|
#获取模组序号
|
||||||
local modem_no=$(uci -q get modem.@global[0].modem_number)
|
local modem_no=$(uci -q get modem.@global[0].modem_number)
|
||||||
@ -258,9 +262,6 @@ m_set_modem_hardware_config()
|
|||||||
uci set modem.modem${modem_no}.path="${physical_path}"
|
uci set modem.modem${modem_no}.path="${physical_path}"
|
||||||
|
|
||||||
uci commit modem
|
uci commit modem
|
||||||
|
|
||||||
#设置物理路径状态
|
|
||||||
m_set_physical_path_status "${physical_path}" "processed"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#删除模组配置
|
#删除模组配置
|
||||||
@ -781,6 +782,11 @@ m_set_network_device()
|
|||||||
local count=$(echo "${network_path}" | grep -o "/net" | wc -l)
|
local count=$(echo "${network_path}" | grep -o "/net" | wc -l)
|
||||||
[ "$count" -ge "2" ] && return
|
[ "$count" -ge "2" ] && return
|
||||||
|
|
||||||
|
#判断路径是否带有usb(排除其他eth网络设备)
|
||||||
|
if [[ "$network" = *"eth"* ]] && [[ "$network_path" != *"usb"* ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
#上报事件
|
#上报事件
|
||||||
m_report_event "${action}" "net" "${network}" "${network_path}"
|
m_report_event "${action}" "net" "${network}" "${network_path}"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user