Browse Source

Use versioncmp function

Without this patch, puppet uses lexicographic ordering to compare the
version string in the operatingsystemrelease fact to the string '14.04',
which works fine on puppet 4 since it is comparing two strings but it is
more correct to use the versioncmp function.

Change-Id: I56d989d22229db3d606e4ac7f788925c216721a0
Colleen Murphy 8 months ago
parent
commit
65eab03783
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      manifests/init.pp

+ 1
- 1
manifests/init.pp View File

@@ -27,7 +27,7 @@ class ethercalc (
27 27
   # file
28 28
   case $::operatingsystem {
29 29
     'Ubuntu': {
30
-      if $::operatingsystemrelease <= '14.04' {
30
+      if versioncmp($::operatingsystemrelease, '14.04') <= 0 {
31 31
         $use_upstart = true
32 32
         if ! $nodejs_version {
33 33
           $use_nodejs_version = '4.x'

Loading…
Cancel
Save