Browse code

Fix version comparison for SUSE Linux Enterprise 12

The version comparison introduced in
I5152f2585c3d4d18853988d6290039d6b1713b99 was broken, because it tried
to use bash's -lt operator for floating point comparison, but bash
only supports integer arithmetic.

So instead use devstack's vercmp() function.

Change-Id: I8aac71c5bb6c2e82479d62831ea0672ba6a9a534

Adam Spiers authored on 2019/01/25 09:29:42
Showing 1 changed files
... ...
@@ -69,7 +69,7 @@ function _neutron_ovs_base_install_agent_packages {
69 69
         restart_service openvswitch
70 70
         sudo systemctl enable openvswitch
71 71
     elif is_suse; then
72
-        if [[ $DISTRO == "sle12" ]] && [[ $os_RELEASE -lt 12.2 ]]; then
72
+        if [[ $DISTRO == "sle12" ]] && vercmp "$os_RELEASE" "<" "12.2" ; then
73 73
             restart_service openvswitch-switch
74 74
         else
75 75
             # workaround for https://bugzilla.suse.com/show_bug.cgi?id=1085971