Files
wire_controlsystem/RK1106/ip.sh
2026-01-05 18:11:56 +08:00

18 lines
531 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
# 网络配置脚本仅设置eth0静态IP无网关/DNS
case "$1" in
start)
# 配置eth0静态IP地址和子网掩码移除多余的反斜杠
ifconfig eth0 192.168.5.100 netmask 255.255.255.0
# 可选:添加执行成功提示,方便确认
echo "✅ eth0已配置静态IP192.168.5.100/24"
;;
stop)
;;
*)
# 补充提示信息,告诉用户正确用法
echo "❌ 使用方法:$0 {start|stop}"
exit 1
;;
esac