OpenWRT云编译NEWIFI-D2

玩机教程 > Router (41) 2025-05-05 13:13:36

官方编译

https://firmware-selector.openwrt.org/

预安装的软件包

追加部分

luci-i18n-base-zh-cn  lsblk cfdisk block-mount luci-i18n-ttyd-zh-cn lm-sensors luci-i18n-wol-zh-cn luci-i18n-upnp-zh-cn luci-i18n-openvpn-zh-cn openvpn-easy-rsa luci-proto-wireguard

首次启动时运行的脚本(uci-defaults)

# Beware! This script will be in /rom/etc/uci-defaults/ as part of the image.
# Uncomment lines to apply:

#WiFi配置
wlan_name="NEWIFI-D2"
wlan_password="1234567890"

#root密码
root_password="password"

#内网配置
lan_ip_address="172.16.16.1"
lan_netmask="255.255.255.0"

#拨号配置(一般不建议配置)
#pppoe_username="111111"
#pppoe_password="111111"

#时区配置
zone_name="Asia/Shanghai"

#主机名
host_name="NEWIFI-D2"


# log potential errors
exec >/tmp/setup.log 2>&1

if [ -n "$root_password" ]; then
  (echo "$root_password"; sleep 1; echo "$root_password") | passwd > /dev/null
fi

# Configure LAN
# More options: https://openwrt.org/docs/guide-user/base-system/basic-networking
if [ -n "$lan_ip_address" ]; then
  uci set network.lan.ipaddr="$lan_ip_address"
  uci set network.lan.netmask="$lan_netmask"
  uci commit network
fi

# Configure WLAN
# More options: https://openwrt.org/docs/guide-u ... ic#wi-fi_interfaces
if [ -n "$wlan_name" -a -n "$wlan_password" -a ${#wlan_password} -ge 8 ]; then
  uci set wireless.@wifi-device[0].disabled='0'
  uci set wireless.@wifi-iface[0].disabled='0'
  uci set wireless.@wifi-iface[0].encryption='psk2'
  uci set wireless.@wifi-iface[0].ssid="$wlan_name"
  uci set wireless.@wifi-iface[0].key="$wlan_password"
  uci commit wireless
fi

# Configure PPPoE
# More options: https://openwrt.org/docs/guide-u ... e_ppp_over_ethernet
if [ -n "$pppoe_username" -a "$pppoe_password" ]; then
  uci set network.wan.proto=pppoe
  uci set network.wan.username="$pppoe_username"
  uci set network.wan.password="$pppoe_password"
  uci commit network
fi


# 时区
if [ -n "$zone_name" ]; then
  uci set system.@system[0].zonename="$zone_name"
  uci set system.@system[0].timezone='UTC-8'
  uci commit system
  /etc/init.d/system reload
  else echo "区域未执行: zone_name"
fi

# 主机名
if [ -n "$host_name" ]; then
	uci set system.@system[0].hostname="$host_name"
    uci commit system
    uci set luci.languages.zh_cn='简体中文 (Chinese Simplified)'
    uci set luci.main.lang='zh_cn'
    uci commit luci
    else echo "区域未执行: host_name"
fi

echo "All done!"

 

 

 


评论
User Image
提示:请评论与当前内容相关的回复,广告、推广或无关内容将被删除。

相关文章
预安装的软件包追加部分luci-i18n-base-zh-cn lsblk cfdisk block-mount luci-i18n-ttyd-zh-cn l
OpenWRT云编译CUDY TR3000 V1官方编译https://firmware-selector.openwrt.org/https://firmwa
OpenWRT云编译NEWIFI-D2官方编译https://firmware-selector.openwrt.org/预安装的软件包追加部分luci-i18
环境基于openwrt/ImmortalWrt 官方在线编译器编译原因挂载自动挂载外部设备使用的默认字符集是iocharset=iso8859-1通过命令mou
清华openwrt软件源配置执行命令配置:sed -i 's_https\?://downloads.openwrt.org_https://mirrors.
openwrt ttyd 拒绝连接 无法打开ssh窗口解决办法。
immortalwrt/openwrt 物理x86设备安装教程,包括资源下载基础配置等。
openwrt 23.05.x 卸载某些软件后报错Unhandled exception during request dispatchingmodule 'luci.ucodebridge' ...
openwrt官方版 x86重启挂载/overflay失效解决
immortalwrt/openwrt 23.05 x86 主路由必选插件推荐i18n-base-zh 语言基础包
注意:以下操作【需一次应用/apply】,不要分开应用 会失联!会失联!会失联! 。中间也不要去启用/禁用WiFi 启用禁用WiFi 会触发应用/apply。要
kmod-fs-exfat对于 exfat格式支持,常见于U盘 kmod-fs-ext4对于 ext4系统文件格式支持,常见于Linux系统磁盘 kmod-fs
提示:操作有重置风险,请备份配置先 接口删除WLAN接口管理菜单,删除WLAN WLAN6 VPN等接口只保留br-lan 添加CLIENT接口添加一个DHCP 客户端接口,命名为CLIENT
如何为路由器 RT-N14U/N56U/N65U/N11P/AC51U/AC54U/AC1200HP/N56UB1独立编译固件Instructions for
前言随着项目升级,目前存在一些项目是jdk8的一些是jdk17的,让Jenkins 使用主机编译环境成为了问题。故此使用docker环境来编译项目,分离各个版本