From 354ebe77dbafc2efb4a5b942115df18b646a578c Mon Sep 17 00:00:00 2001 From: Teddysun Date: Sat, 15 Dec 2018 10:18:19 +0900 Subject: [PATCH] Update comments Signed-off-by: Teddysun --- bbr.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/bbr.sh b/bbr.sh index f1502e9..81cec55 100644 --- a/bbr.sh +++ b/bbr.sh @@ -321,8 +321,18 @@ install_bbr() { rm -rf ${rpm_kernel_devel_name} wget -c -t3 -T60 -O ${rpm_kernel_devel_name} ${rpm_kernel_url_2}${rpm_kernel_devel_name} fi - [ -f ${rpm_kernel_name} ] && rpm -ivh ${rpm_kernel_name} || echo -e "${red}Error:${plain} Download ${rpm_kernel_name} failed, please check it."; exit 1 - [ -f ${rpm_kernel_devel_name} ] && rpm -ivh ${rpm_kernel_devel_name} || echo -e "${red}Error:${plain} Download ${rpm_kernel_devel_name} failed, please check it."; exit 1 + if [ -f "${rpm_kernel_name}" ]; then + rpm -ivh ${rpm_kernel_name} + else + echo -e "${red}Error:${plain} Download ${rpm_kernel_name} failed, please check it." + exit 1 + fi + if [ -f "${rpm_kernel_devel_name}" ]; then + rpm -ivh ${rpm_kernel_devel_name} + else + echo -e "${red}Error:${plain} Download ${rpm_kernel_devel_name} failed, please check it." + exit 1 + fi rm -f ${rpm_kernel_name} ${rpm_kernel_devel_name} elif centosversion 7; then yum -y install kernel-ml kernel-ml-devel