bugfix:修复因profile_id填写错误导致mk-base-image执行失败的错误

This commit is contained in:
fumingwei
2022-06-28 11:43:51 +08:00
parent 9068d33ac1
commit 1a700e208e

View File

@@ -17,11 +17,12 @@ case $profile_id in
"TSG-X-NXR620G40-R01-P1403")
kernel_version="3.10.0-1160.59.1.el7.x86_64"
;;
"7400MCN0P01R01" | "7400MCN123P01R01" |"9000NPBP01R01")
"7400-MCN0-P01R01" | "7400-MCN123-P01R01" |"9000-NPB-P01R01")
kernel_version="5.4.159-1.el7.elrepo.x86_64"
;;
*)
kernel_version="error_profile_id"
echo "Set kernel_version failed, profile_id: $profile_id"
exit 1
;;
esac
@@ -63,12 +64,12 @@ case $profile_id in
yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt install $package_to_install_CentOS7
yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt install $kernel_package_to_install
;;
"7400MCN0P01R01" | "7400MCN123P01R01" |"9000NPBP01R01")
"7400-MCN0-P01R01" | "7400-MCN123-P01R01" |"9000-NPB-P01R01")
yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt install $package_to_install_CentOS7
yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt localinstall $locak_package_to_install_CentOS7
;;
*)
echo "Error profile id"
echo "Error profile id, profile_id: $profile_id"
exit 1
;;
esac