Update gl-inet.sh

This commit is contained in:
悟空的日常镜像仓库 2024-03-22 19:22:48 +08:00
parent d2be7a0db1
commit 3aa8020a53
1 changed files with 31 additions and 36 deletions

View File

@ -1,14 +1,14 @@
#!/bin/sh
red(){
red() {
echo -e "\033[31m\033[01m$1\033[0m"
}
green(){
green() {
echo -e "\033[32m\033[01m$1\033[0m"
}
yellow(){
yellow() {
echo -e "\033[33m\033[01m$1\033[0m"
}
blue(){
blue() {
echo -e "\033[34m\033[01m$1\033[0m"
}
third_party_source="https://istore.linkease.com/repo/all/nas_luci"
@ -303,22 +303,7 @@ update_opkg_config() {
case $kernel_version in
5.4*)
mt6000_opkg="https://raw.githubusercontent.com/wukongdaily/gl-inet-onescript/master/mt-6000/distfeeds-5.4.conf"
;;
5.15*)
mt6000_opkg="https://raw.githubusercontent.com/wukongdaily/gl-inet-onescript/master/mt-6000/distfeeds.conf"
;;
*)
echo "Unsupported kernel version: $kernel_version"
return 1
;;
esac
wget -O /etc/opkg/distfeeds.conf ${mt6000_opkg}
if [ $? -eq 0 ]; then
echo "Opkg configuration updated successfully."
else
echo "Failed to update opkg configuration."
return 1
fi
# 更换5.4.238 内核之后 缺少的依赖
mkdir -p /tmp/mt6000
wget -O /tmp/mt6000/script-utils.ipk "https://raw.githubusercontent.com/wukongdaily/gl-inet-onescript/master/mt-6000/script-utils.ipk"
@ -326,6 +311,16 @@ update_opkg_config() {
wget -O /tmp/mt6000/lsblk.ipk "https://raw.githubusercontent.com/wukongdaily/gl-inet-onescript/master/mt-6000/lsblk.ipk"
opkg update
opkg install /tmp/mt6000/*.ipk
;;
5.15*)
mt6000_opkg="https://raw.githubusercontent.com/wukongdaily/gl-inet-onescript/master/mt-6000/distfeeds.conf"
wget -O /etc/opkg/distfeeds.conf ${mt6000_opkg}
;;
*)
echo "Unsupported kernel version: $kernel_version"
return 1
;;
esac
}
do_luci_app_adguardhome() {