9394952

导航

动态修改OPENWRT网卡MAC及DHCP主机名的脚本

/etc/init.d/macchgr

#!/bin/sh /etc/rc.common

START=17

uci set network.wwan.macaddr=00:00:0c`hexdump -n3 -e'3/1 ":%02x"' /dev/urandom`
uci set network.wwan.hostname=WIN`hexdump -n1 -e'"%06x"' /dev/urandom`
uci commit network

 

posted on 2023-12-23 21:42  9394952  阅读(177)  评论(0编辑  收藏  举报