更新 bin/ ZeroWrt.backup

Signed-off-by: zhao <zhao@noreply.localhost>
This commit is contained in:
zhao 2024-12-30 00:43:27 +08:00
parent 9963877f08
commit ce8dc156a9

View File

@ -326,6 +326,17 @@ install_apps() {
configure_ipv6() {
color_output "\e[34m[IPv6 设置]\e[0m"
# 检查是否为 PPPoE 模式
local wan_proto=$(uci -q get network.wan.proto)
if [ "$wan_proto" != "pppoe" ]; then
color_output "\e[31m错误: 无法开启 IPv6\e[0m"
color_output "\e[31m当前上网方式为: $wan_proto\e[0m"
color_output "\e[31m请先切换为 PPPoE 模式\e[0m"
read -p "按 Enter 键返回菜单..."
show_menu
return
fi
# 检查当前状态
local current_ra=$(uci -q get dhcp.lan.ra)
local current_dhcpv6=$(uci -q get dhcp.lan.dhcpv6)
@ -360,9 +371,9 @@ configure_ipv6() {
# 保存设置
uci commit dhcp
# 重启相关服务
/etc/init.d/odhcpd restart
/etc/init.d/dnsmasq restart
# 重启相关服务(重定向输出)
/etc/init.d/odhcpd restart >/dev/null 2>&1
/etc/init.d/dnsmasq restart >/dev/null 2>&1
color_output "\e[32mIPv6 已开启!\e[0m"
color_output "\e[32m- RA 服务: 服务模式\e[0m"
@ -384,9 +395,9 @@ configure_ipv6() {
# 保存设置
uci commit dhcp
# 重启相关服务
/etc/init.d/odhcpd restart
/etc/init.d/dnsmasq restart
# 重启相关服务(重定向输出)
/etc/init.d/odhcpd restart >/dev/null 2>&1
/etc/init.d/dnsmasq restart >/dev/null 2>&1
color_output "\e[32mIPv6 已关闭!\e[0m"
color_output "\e[32m- RA 服务: 已禁用\e[0m"