Fixed tftp::server for CentOS and RHEL 6
This commit is contained in:
parent
738a1ae59a
commit
eddce9a148
1 changed files with 19 additions and 12 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Reference in a new issue