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 { case $::operatingsystem {
debian,fedora,ubuntu: { "debian","fedora","ubuntu": {
file { "/var/lib/tftpboot": $tftpdir = "/var/lib/tftpboot"
ensure => link, }
target => "/srv/tftpboot", "centos","redhat": {
force => true, case $::operatingsystemrelease {
require => File["/srv/tftpboot"], /^[45]\./: {
$tftpdir = "/tftpboot"
}
default: {
$tftpdir = "/var/lib/tftpboot"
}
} }
} }
default: { default: {
file { "/tftpboot": $tftpdir = "/tftpboot"
ensure => link,
target => "/srv/tftpboot",
force => true,
require => File["/srv/tftpboot"],
}
} }
} }
file { $tftpdir:
ensure => link,
target => "/srv/tftpboot",
force => true,
require => File["/srv/tftpboot"],
}
if "${selinux}" == "true" { if "${selinux}" == "true" {
selinux::manage_fcontext { "/srv/tftpboot(/.*)?": selinux::manage_fcontext { "/srv/tftpboot(/.*)?":
type => "tftpdir_t", type => "tftpdir_t",