Skip to content

Commit

Permalink
Allow usage on more recent Fedora systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
pecastro committed Jul 31, 2014
1 parent f936f90 commit 6cab5a5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand All @@ -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}")
}
Expand Down

0 comments on commit 6cab5a5

Please sign in to comment.