From 22c84666636a63a7ce829e5411fefc4ee22cf21a Mon Sep 17 00:00:00 2001 From: yuyx <237899745@qq.com> Date: Mon, 1 Dec 2025 13:02:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E4=B8=BA=E9=9D=99=E6=80=81=20IP=20=E5=8A=9F=E8=83=BD=E5=88=B0?= =?UTF-8?q?=E4=B8=BB=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增选项4:切换为静态 IP(固定当前 IP) - 复用已有的 configure_static_ip 函数 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- setup_cups.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/setup_cups.sh b/setup_cups.sh index 1423fc3..7b3a9d1 100755 --- a/setup_cups.sh +++ b/setup_cups.sh @@ -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