devstack: fix ovs install on fedora like OS
This patch I3d0981fbe30f2436f00c200919b50aeb97491252 resolved custom kernel version, but introduced a bug for the 3.x series. This patch avoids the replacement in the case of the 3.x series. Closes-Bug: #1704077 Co-Authored-By: Moshe Levi <moshele@mellanox.com> Change-Id: Iff1c5a39fe4b0d9320910d0cfafdd36873825d03
This commit is contained in:
parent
927edca4fd
commit
0177568c93
@ -53,10 +53,15 @@ function prepare_for_compilation {
|
||||
|
||||
if is_fedora ; then
|
||||
# is_fedora covers Fedora, RHEL, CentOS, etc...
|
||||
# dash is illegal character in rpm version so replace
|
||||
# them with underscore like it is done in the kernel
|
||||
# https://github.com/torvalds/linux/blob/master/scripts/package/mkspec#L25
|
||||
KERNEL_VERSION=`echo $KERNEL_VERSION | sed -e "s/-/_/g"`
|
||||
if [[ ${KERNEL_VERSION:0:2} != "3." ]]; then
|
||||
# dash is illegal character in rpm version so replace
|
||||
# them with underscore like it is done in the kernel
|
||||
# https://github.com/torvalds/linux/blob/master/scripts/package/mkspec#L25
|
||||
# but only for latest series of the kernel, not 3.x
|
||||
|
||||
KERNEL_VERSION=`echo $KERNEL_VERSION | tr - _`
|
||||
fi
|
||||
|
||||
echo NOTE: if kernel-devel-$KERNEL_VERSION or kernel-headers-$KERNEL_VERSION installation
|
||||
echo failed, please, provide a repository with the package, or yum update / reboot
|
||||
echo your machine to get the latest kernel.
|
||||
|
Loading…
Reference in New Issue
Block a user