Commit d2c3bda5 authored by Nathan Ward's avatar Nathan Ward
Browse files

Add function to check if the installed freeradius version, or the one we are...

Add function to check if the installed freeradius version, or the one we are targetting is 3.1.x or not
parent 86be8aef
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -27,6 +27,16 @@ class freeradius (
    notify { 'This module is only compatible with FreeRADIUS 3.': }
  }

  # Guess if we are running FreeRADIUS 3.1.x
  if (
    ($package_ensure =~ /^3\.1\./) or
    ($facts['freeradius_version'] and $facts['freeradius_version'] =~ /^3\.1\./)
  ) {
    $fr_3_1 = true
  } else {
    $fr_3_1 = false
  }

  validate_re($log_destination, '^(files|syslog|stdout|stderr)$',
    "log_destination value (${log_destination}) is not a valid value")