线条厂各设备控制代码
This commit is contained in:
18
RK1106/ip.sh
Normal file
18
RK1106/ip.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 网络配置脚本:仅设置eth0静态IP(无网关/DNS)
|
||||
case "$1" in
|
||||
start)
|
||||
# 配置eth0静态IP地址和子网掩码(移除多余的反斜杠)
|
||||
ifconfig eth0 192.168.5.100 netmask 255.255.255.0
|
||||
# 可选:添加执行成功提示,方便确认
|
||||
echo "✅ eth0已配置静态IP:192.168.5.100/24"
|
||||
;;
|
||||
stop)
|
||||
;;
|
||||
*)
|
||||
# 补充提示信息,告诉用户正确用法
|
||||
echo "❌ 使用方法:$0 {start|stop}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user