aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorBranan Purvine-Riley <branan@puppetlabs.com>2012-07-27 16:07:55 -0700
committerBranan Purvine-Riley <branan@puppetlabs.com>2012-07-27 16:07:55 -0700
commitf8e21b5238281810ea9e4cfc5723d9f9a8116979 (patch)
tree747efca041902c7c453af055fa058cfcdc168ae3 /manifests
parent0f70b0bfe7b5f8475ffade5f9e14c0632e42bd47 (diff)
parent9e55e18c84259bb007fa023c9e06b908e8f042a2 (diff)
downloadpuppet-tftp-f8e21b5238281810ea9e4cfc5723d9f9a8116979.tar.gz
puppet-tftp-f8e21b5238281810ea9e4cfc5723d9f9a8116979.tar.bz2
Merge pull request #15 from nanliu/tb/inetd
Update xinetd updates
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp23
-rw-r--r--manifests/params.pp2
2 files changed, 13 insertions, 12 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 973049c..4fe22be 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -29,7 +29,7 @@ class tftp (
$address = $tftp::params::address,
$port = $tftp::params::port,
$options = $tftp::params::options,
- $inetd = false,
+ $inetd = $tftp::params::inetd,
$package = $tftp::params::package,
$binary = $tftp::params::binary,
$defaults = $tftp::params::defaults
@@ -39,20 +39,20 @@ class tftp (
ensure => present,
name => $package,
}
+
if $defaults {
- file { '/etc/default/tftpd-hpa':
- ensure => file,
- owner => 'root',
- group => 'root',
- mode => '0644',
- content => template('tftp/tftpd-hpa.erb'),
- require => Package['tftpd-hpa'],
+ file { '/etc/default/tftpd-hpa':
+ ensure => file,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ content => template('tftp/tftpd-hpa.erb'),
+ require => Package['tftpd-hpa'],
notify => Service['tftpd-hpa'],
- }
+ }
}
if $inetd {
-
include 'xinetd'
xinetd::service { 'tftp':
@@ -67,7 +67,8 @@ class tftp (
flags => 'IPv4',
per_source => '11',
wait => 'yes',
- }
+ }
+
$svc_ensure = stopped
$svc_enable = false
} else {
diff --git a/manifests/params.pp b/manifests/params.pp
index 3520068..bbe86cc 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -6,6 +6,7 @@ class tftp::params {
$port = '69'
$options = '--secure'
$binary = '/usr/sbin/in.tftpd'
+ $inetd = true
case $::osfamily {
'debian': {
@@ -42,5 +43,4 @@ class tftp::params {
warning("tftp:: $::operatingsystem may not be supported")
}
}
-
}