Fixed tftp::server for CentOS and RHEL 6

This commit is contained in:
Timo Mkinen 2013-01-16 10:35:39 +02:00
parent 738a1ae59a
commit eddce9a148

View file

@ -39,24 +39,31 @@ class tftp::server {
}
case $::operatingsystem {
debian,fedora,ubuntu: {
file { "/var/lib/tftpboot":
ensure => link,
target => "/srv/tftpboot",
force => true,
require => File["/srv/tftpboot"],
"debian","fedora","ubuntu": {
$tftpdir = "/var/lib/tftpboot"
}
"centos","redhat": {
case $::operatingsystemrelease {
/^[45]\./: {
$tftpdir = "/tftpboot"
}
default: {
$tftpdir = "/var/lib/tftpboot"
}
}
}
default: {
file { "/tftpboot":
ensure => link,
target => "/srv/tftpboot",
force => true,
require => File["/srv/tftpboot"],
}
$tftpdir = "/tftpboot"
}
}
file { $tftpdir:
ensure => link,
target => "/srv/tftpboot",
force => true,
require => File["/srv/tftpboot"],
}
if "${selinux}" == "true" {
selinux::manage_fcontext { "/srv/tftpboot(/.*)?":
type => "tftpdir_t",