Raise Ubuntu minimum to 24.04

This commit is contained in:
byjoey
2026-06-15 01:08:10 +08:00
parent 4e86cd1740
commit 18110692e3
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ bash <(curl -fsSL https://raw.githubusercontent.com/byJoey/Actions-bbr-v3/main/i
| 项目 | 要求 | | 项目 | 要求 |
| --- | --- | | --- | --- |
| 最低支持系统 | Ubuntu 22.04+ / Debian 12+ | | 最低支持系统 | Ubuntu 24.04+ / Debian 12+ |
| 推荐系统 | Ubuntu 24.04+ / Debian 12+ | | 推荐系统 | Ubuntu 24.04+ / Debian 12+ |
| 包管理器 | `apt-get` | | 包管理器 | `apt-get` |
| 架构 | `x86_64` / `aarch64` | | 架构 | `x86_64` / `aarch64` |
+4 -4
View File
@@ -94,7 +94,7 @@ assert_supported_kernel_install_system() {
if [[ ! -r /etc/os-release ]]; then if [[ ! -r /etc/os-release ]]; then
echo -e "\033[31m无法识别当前系统版本,已拒绝安装 7.x 主线内核。\033[0m" echo -e "\033[31m无法识别当前系统版本,已拒绝安装 7.x 主线内核。\033[0m"
echo -e "\033[33m最低支持:Ubuntu 22.04+ / Debian 12+;推荐系统:Ubuntu 24.04+ / Debian 12。\033[0m" echo -e "\033[33m最低支持:Ubuntu 24.04+ / Debian 12+;推荐系统:Ubuntu 24.04+ / Debian 12。\033[0m"
return 1 return 1
fi fi
@@ -106,7 +106,7 @@ assert_supported_kernel_install_system() {
case "$os_id" in case "$os_id" in
ubuntu) ubuntu)
min_version="22.04" min_version="24.04"
distro_name="Ubuntu" distro_name="Ubuntu"
;; ;;
debian) debian)
@@ -115,14 +115,14 @@ assert_supported_kernel_install_system() {
;; ;;
*) *)
echo -e "\033[31m当前系统为 $os_name,不在 7.x 主线内核安装白名单内。\033[0m" echo -e "\033[31m当前系统为 $os_name,不在 7.x 主线内核安装白名单内。\033[0m"
echo -e "\033[33m最低支持:Ubuntu 22.04+ / Debian 12+;推荐系统:Ubuntu 24.04+ / Debian 12。旧系统/衍生系统可能因用户态、initramfs 或引导链路过旧导致 kernel panic。\033[0m" echo -e "\033[33m最低支持:Ubuntu 24.04+ / Debian 12+;推荐系统:Ubuntu 24.04+ / Debian 12。旧系统/衍生系统可能因用户态、initramfs 或引导链路过旧导致 kernel panic。\033[0m"
return 1 return 1
;; ;;
esac esac
if [[ -z "$os_version" ]] || ! version_ge "$os_version" "$min_version"; then if [[ -z "$os_version" ]] || ! version_ge "$os_version" "$min_version"; then
echo -e "\033[31m当前系统版本过旧:$os_name。已拒绝安装 7.x 主线内核。\033[0m" echo -e "\033[31m当前系统版本过旧:$os_name。已拒绝安装 7.x 主线内核。\033[0m"
echo -e "\033[33m最低要求:${distro_name} ${min_version}+。推荐使用 Ubuntu 24.04+ 或 Debian 12。请先升级系统,再重新运行安装脚本。\033[0m" echo -e "\033[33m最低要求:${distro_name} ${min_version}+。推荐使用 Ubuntu 24.04+ 或 Debian 12+。请先升级系统,再重新运行安装脚本。\033[0m"
echo -e "\033[33m你仍可使用本脚本的状态检查、网络调优、清空优化或卸载功能。\033[0m" echo -e "\033[33m你仍可使用本脚本的状态检查、网络调优、清空优化或卸载功能。\033[0m"
return 1 return 1
fi fi