-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathadd-test-packages.sh
40 lines (35 loc) · 1.08 KB
/
add-test-packages.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
38
39
40
#!/bin/bash
#=================================================
# this script is from https://github.com/lunatickochiya/Lunatic-s805-rockchip-Action
# Written By lunatickochiya
# QQ group :286754582 https://jq.qq.com/?_wv=1027&k=5QgVYsC
#=================================================
function add_nft_config() {
for file in package-configs/single/*-nftables.config; do echo "# ADD TURBOACC
CONFIG_PACKAGE_luci-app-turboacc=y
# sfe
CONFIG_PACKAGE_kmod-fast-classifier=y
CONFIG_PACKAGE_kmod-shortcut-fe=y
CONFIG_PACKAGE_kmod-shortcut-fe-cm=n
CONFIG_PACKAGE_kmod-nft-fullcone=y
" >> "$file"; done
}
function add_ipt_config() {
for file in package-configs/single/*-iptables.config; do echo "# ADD TURBOACC
CONFIG_PACKAGE_luci-app-turboacc=y
# iptable legacy in nft
CONFIG_PACKAGE_ip6tables-zz-legacy=y
CONFIG_PACKAGE_iptables-zz-legacy=y
# sfe
CONFIG_PACKAGE_kmod-fast-classifier=m
CONFIG_PACKAGE_kmod-shortcut-fe=m
CONFIG_PACKAGE_kmod-shortcut-fe-cm=m
" >> "$file"; done
}
if [ "$1" == "nft" ]; then
add_nft_config
elif [ "$1" == "ipt" ]; then
add_ipt_config
else
echo "Invalid argument"
fi