From 6cab5a5d782d939a2b272fe15694a0c9e9201913 Mon Sep 17 00:00:00 2001 From: "Paulo E. Castro" Date: Thu, 31 Jul 2014 16:40:17 +0100 Subject: [PATCH] Allow usage on more recent Fedora systems. --- manifests/params.pp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index fea23bd..9916dda 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -3,21 +3,23 @@ # This class should be considered private. # class udev::params { - $udev_package = 'udev' $udevadm_path = '/sbin' - case $::osfamily { + case $::operatingsystem { 'debian': { + $udev_package = 'udev' $udevlogpriority = 'udevadm control --log-priority' $udevtrigger = 'udevadm trigger' } 'redhat': { case $::operatingsystemmajrelease { '5': { + $udev_package = 'udev' $udevtrigger = 'udevtrigger' $udevlogpriority = 'udevcontrol log_priority' } '6','7': { + $udev_package = 'udev' $udevtrigger = 'udevadm trigger' $udevlogpriority = 'udevadm control --log-priority' } @@ -26,6 +28,16 @@ } } } + 'fedora': { + if ($::operatingsystemmajrelease >= 20) { + $udev_package = 'systemd' + $udevtrigger = 'udevadm trigger' + $udevlogpriority = 'udevadm control --log-priority' + } + else { + fail("Module ${module_name} might not be supported on Fedora release ${::operatingsystemmajrelease}") + } + } default: { fail("Module ${module_name} is not supported on ${::operatingsystem}") }