Skip to content

Commit

Permalink
# v1.0.11 新增 支持内核 4.11.x 后的版本
Browse files Browse the repository at this point in the history
  • Loading branch information
Toyo authored May 7, 2017
1 parent 5d18cf0 commit ec64e11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bbr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export PATH
#=================================================
# System Required: Debian/Ubuntu
# Description: TCP-BBR
# Version: 1.0.10
# Version: 1.0.11
# Author: Toyo
# Blog: https://doub.io/wlzy-16/
#=================================================
Expand Down Expand Up @@ -33,7 +33,7 @@ check_sys(){
release="centos"
fi
}
# 本段代码来源自: https://teddysun.com/489.html
# 本段获取最新版本的代码来源自: https://teddysun.com/489.html
Set_latest_new_version(){
echo -e "请输入 要下载安装的Linux内核版本(BBR) [ 格式: x.xx.xx ,例如: 4.10.12 ]
${Tip} 内核版本列表请去这里获取:[ http://kernel.ubuntu.com/~kernel-ppa/mainline/ ]"
Expand All @@ -43,7 +43,7 @@ ${Tip} 内核版本列表请去这里获取:[ http://kernel.ubuntu.com/~kernel
}
get_latest_new_version(){
echo -e "${Info} 检测内核最新版本中..."
latest_version=$(wget -qO- "http://kernel.ubuntu.com/~kernel-ppa/mainline/" | awk -F'\"v' '/v[4-9].[0-9][0-9].[0-9]/{print $2}' | cut -d/ -f1 | sort -V | tail -1)
latest_version=$(wget -qO- "http://kernel.ubuntu.com/~kernel-ppa/mainline/" | awk -F'\"v' '/v[4-9].[0-9]*.[0-9]/{print $2}' |grep -v '\-rc'| cut -d/ -f1 | sort -V | tail -1)
[[ -z ${latest_version} ]] && echo -e "\033[41;37m [错误] \033[0m 检测内核最新版本失败 !" && exit 1
echo -e "${Info} 当前内核最新版本为 : ${latest_version}"
}
Expand Down

0 comments on commit ec64e11

Please sign in to comment.