centos6.2升级内核

2021-05-19 10:59:48 浏览数 (1)

if ! dmidecode | grep 'Product Name' | grep R720;then

echo -e '33[31mNot R720,exit33[0m' && sleep 99999

elif ! grep 6.2 /etc/redhat-release;then

echo -e '33[31mNot CentOS 6.2,exit33[0m' && sleep 99999

elif ! uname -a | grep 2.6.32-220.el6.x86_64;then

echo -e '33[31mWrong Kernel version not 2.6.32-220.el6,exit33[0m ' && sleep 99999

else

yum -y install kernel && grep '2.6.32-358.6' /etc/grub.conf && echo -e "33[33mSuccessfully33[0m"

fi

0 人点赞