forked from HAN767/OpenWrt-Newifi_D2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
diy-part2.sh
executable file
·37 lines (29 loc) · 1.38 KB
/
diy-part2.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
29
30
31
32
33
34
35
36
37
#!/bin/bash
#============================================================
# https://github.com/P3TERX/Actions-OpenWrt
# File name: diy-part2.sh
# Description: OpenWrt DIY script part 2 (After Update feeds)
# Lisence: MIT
# Author: P3TERX
# Blog: https://p3terx.com
#============================================================
# Modify default IP
#sed -i 's/192.168.1.1/10.0.0.1/g' package/base-files/files/bin/config_generate
# Modify hostname
# sed -i 's/OpenWrt/Newifi-D2/g' package/base-files/files/bin/config_generate
# Modify the version number
sed -i "s/OpenWrt /Actions build $(TZ=UTC-8 date "+%Y.%m.%d") @ OpenWrt /g" package/lean/default-settings/files/zzz-default-settings
# Modify default theme
sed -i 's/luci-theme-bootstrap/luci-theme-material/g' feeds/luci/collections/luci/Makefile
# wifi
sed -i 's/US/CN/g' package/kernel/mac80211/files/lib/wifi/mac80211.sh
# wifi name
sed -i 's/OpenWrt/Newifi D2/g' package/kernel/mac80211/files/lib/wifi/mac80211.sh
# Add kernel build user
[ -z $(grep "CONFIG_KERNEL_BUILD_USER=" .config) ] &&
echo 'CONFIG_KERNEL_BUILD_USER="Actions"' >>.config ||
sed -i 's@\(CONFIG_KERNEL_BUILD_USER=\).*@\1$"Actions"@' .config
# Add kernel build domain
[ -z $(grep "CONFIG_KERNEL_BUILD_DOMAIN=" .config) ] &&
echo 'CONFIG_KERNEL_BUILD_DOMAIN="GitHub Actions"' >>.config ||
sed -i 's@\(CONFIG_KERNEL_BUILD_DOMAIN=\).*@\1$"GitHub Actions"@' .config