forked from iii80/OpenWrt-Mini
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDIY-2.sh
28 lines (19 loc) · 1.11 KB
/
DIY-2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 此脚本用处是:定制个性化参数
#============================================================================================
# 1-设置默认主题
# sed -i 's/bootstrap/opentomcat/g' ./feeds/luci/collections/luci/Makefile
# 2-设置管理地址
sed -i 's/192.168.1.1/192.168.0.111/g' package/base-files/files/bin/config_generate
# 3-编译内核版本
sed -i 's/KERNEL_PATCHVER:=6.1/KERNEL_PATCHVER:=6.6/g' ./target/linux/x86/Makefile
# 4-设置密码为空
sed -i '/CYXluq4wUazHjmCDBCqXF/d' package/lean/default-settings/files/zzz-default-settings
# 5-修改时间格式
sed -i 's/os.date()/os.date("%Y-%m-%d %H:%M:%S")/g' package/lean/autocore/files/*/index.htm
# 6-添加固件日期
sed -i 's/IMG_PREFIX:=/IMG_PREFIX:=$(BUILD_DATE_PREFIX)-/g' ./include/image.mk
sed -i '/DTS_DIR:=$(LINUX_DIR)/a\BUILD_DATE_PREFIX := $(shell date +'%F')' ./include/image.mk
# 7-修正硬件信息
sed -i 's/${g}.*/${a}${b}${c}${d}${e}${f}${hydrid}/g' package/lean/autocore/files/x86/autocore
# 8-增固件连接数
sed -i '/customized in this file/a net.netfilter.nf_conntrack_max=165535' package/base-files/files/etc/sysctl.conf