目的:修改默认登陆的IP地址192.168.1.1
版本:V17
修改文件:./package/base-files/files/bin/config_generate
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
case "$protocol" in static) local ipad case "$1" in lan) ipad=${ipaddr:-"192.168.1.1"} ;; *) ipad=${ipaddr:-"192.168.$((addr_offset++)).1"} ;; esac netm=${netmask:-"255.255.255.0"} uci -q batch <<-EOF set network.$1.proto='static' set network.$1.ipaddr='$ipad' set network.$1.netmask='$netm' EOF [ -e /proc/sys/net/ipv6 ] && uci set network.$1.ip6assign='60' ;; |
0 条评论