OpenWrt修改源码编译

1.修改主机名,设定时区,IP地址

打开/package/base-files/files/bin/config_generate文件,修改如下

  1. generate_static_system() {
  2. uci -q batch <<-EOF
  3. delete system.@system[0]
  4. add system system
  5. set system.@system[-1].hostname='LEDE'#修改主机名
  6. set system.@system[-1].timezone='Asia/Shanghai'#修改默认时区
  7. lan) ipad=${ipaddr:-"192.168.1.1"} ;;#修改默认IP

2.修改WIFI信息

打开/package/kernel/mac80211/files/lib/wifi/mac80211.sh文件,修改如下

  1. less.radio${devidx}.disabled=0#改为0自动打开wifi
  2. set wireless.default_radio${devidx}=wifi-iface
  3. set wireless.default_radio${devidx}.device=radio${devidx}
  4. set wireless.default_radio${devidx}.network=lan
  5. set wireless.default_radio${devidx}.mode=ap
  6. set wireless.default_radio${devidx}.ssid=LEDE#wifi名称
  7. set wireless.default_radio${devidx}.encryption=psk2#wifi加密方式,没有是none
  8. set wireless.default_radio${devidx}.key=password#wifi密码

3.SSH/TELNET显示信息修改方式:

打开/package/base-files/files/etc/banner文件

huan

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: