feat: 添加切换为静态 IP 功能到主菜单
- 新增选项4:切换为静态 IP(固定当前 IP) - 复用已有的 configure_static_ip 函数 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1430,9 +1430,10 @@ show_menu() {
|
||||
echo " 1) 安装 CUPS 打印服务"
|
||||
echo " 2) 卸载 CUPS 打印服务"
|
||||
echo " 3) 切换为 DHCP 自动获取 IP"
|
||||
echo " 4) 切换为静态 IP(固定当前 IP)"
|
||||
echo " 0) 退出"
|
||||
echo ""
|
||||
read -p " 请输入选项 [1/2/3/0]: " choice < /dev/tty
|
||||
read -p " 请输入选项 [1/2/3/4/0]: " choice < /dev/tty
|
||||
|
||||
case "$choice" in
|
||||
1)
|
||||
@@ -1448,6 +1449,14 @@ show_menu() {
|
||||
read -p "按 Enter 返回主菜单..." < /dev/tty
|
||||
show_menu
|
||||
;;
|
||||
4)
|
||||
check_root
|
||||
configure_static_ip
|
||||
show_static_ip_result
|
||||
echo ""
|
||||
read -p "按 Enter 返回主菜单..." < /dev/tty
|
||||
show_menu
|
||||
;;
|
||||
0)
|
||||
echo "已退出"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user