Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mgqnfoqv7k2w
AutoBuildImmortalWrt
Commits
5484e8ad
Commit
5484e8ad
authored
Oct 31, 2024
by
wukongdaily
Browse files
增加自定义uci脚本和插件
parent
07db6c18
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
4 deletions
+37
-4
.github/workflows/build.yml
.github/workflows/build.yml
+2
-2
build.sh
build.sh
+9
-2
files/etc/uci-defaults/custom
files/etc/uci-defaults/custom
+26
-0
No files found.
.github/workflows/build.yml
View file @
5484e8ad
...
...
@@ -28,9 +28,9 @@ jobs:
firmware_file=$(find "${{ github.workspace }}/bin" -name '*squashfs-combined-efi.img.gz' | head -n 1)
echo "Firmware file located at $firmware_file"
echo "firmware_path=$firmware_file" >> $GITHUB_ENV
-
name
:
Upload firmware
uses
:
actions/upload-artifact@v
3
uses
:
actions/upload-artifact@v
4
with
:
name
:
firmware
path
:
${{ env.firmware_path }}
compression-level
:
0
\ No newline at end of file
build.sh
View file @
5484e8ad
...
...
@@ -3,7 +3,14 @@
PACKAGES
=
""
PACKAGES
=
"
$PACKAGES
curl"
PACKAGES
=
"
$PACKAGES
luci-i18n-firewall-zh-cn"
PACKAGES
=
"
$PACKAGES
luci-i18n-filebrowser-zh-cn"
PACKAGES
=
"
$PACKAGES
luci-app-argon-config"
PACKAGES
=
"
$PACKAGES
luci-i18n-argon-config-zh-cn"
PACKAGES
=
"
$PACKAGES
luci-i18n-opkg-zh-cn"
PACKAGES
=
"
$PACKAGES
luci-i18n-ttyd-zh-cn"
PACKAGES
=
"
$PACKAGES
luci-i18n-passwall-zh-cn"
PACKAGES
=
"
$PACKAGES
luci-app-openclash"
PACKAGES
=
"
$PACKAGES
luci-i18n-homeproxy-zh-cn"
PACKAGES
=
"
$PACKAGES
openssh-sftp-server"
make image
PACKAGES
=
"
$PACKAGES
"
ROOTFS_PARTSIZE
=
"2048"
FILE
=
immortalwrt-23.05.4-x86-64-generic-squashfs-combined-efi.img.gz
make image
PACKAGES
=
"
$PACKAGES
"
ROOTFS_PARTSIZE
=
"2048"
files/etc/uci-defaults/custom
0 → 100644
View file @
5484e8ad
#!/bin/sh
# 设置默认wan口防火墙打开 方便虚拟机用户首次访问webui
uci
set
firewall.@zone[1].input
=
'ACCEPT'
uci commit firewall
# 设置主机名映射 解决安卓原生TV首次连不上网的问题
uci add dhcp domain
uci
set
"dhcp.@domain[-1].name=time.android.com"
uci
set
"dhcp.@domain[-1].ip=203.107.6.88"
uci commit dhcp
# 根据网卡数量配置网络
count
=
0
for
iface
in
$(
ls
/sys/class/net |
grep
-v
lo
)
;
do
# 检查是否有对应的设备,并且排除无线网卡
if
[
-e
/sys/class/net/
$iface
/device
]
&&
[[
$iface
==
eth
*
||
$iface
==
en
*
]]
;
then
count
=
$((
count
+
1
))
fi
done
if
[
"
$count
"
-eq
1
]
;
then
# 单个网卡,设置为 DHCP 模式
uci
set
network.lan.proto
=
'dhcp'
uci commit network
elif
[
"
$count
"
-gt
1
]
;
then
# 多个网卡,保持静态 IP
uci
set
network.lan.ipaddr
=
'192.168.100.1'
uci commit network
fi
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment