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 {
|
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",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue