aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorcrayfishx <craig@craigdunn.org>2012-07-10 14:27:10 -0700
committercrayfishx <craig@craigdunn.org>2012-07-10 14:27:10 -0700
commitc3d0b8b46f1cf9ed1b00660bacd1ebbcd96800da (patch)
treebe82ff63b55eb8f097ea4d582a66298cab7c7666 /manifests
parent408f02ba9cb24804a09462ce5448c49bf1c0c8ca (diff)
downloadpuppet-tftp-c3d0b8b46f1cf9ed1b00660bacd1ebbcd96800da.tar.gz
puppet-tftp-c3d0b8b46f1cf9ed1b00660bacd1ebbcd96800da.tar.bz2
Removing dependancy on 'inetd' which doesn't exist in the forge...
Replaced with xinetd::service to set up the xinetd configuration
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp38
1 files changed, 17 insertions, 21 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 5057eb2..df9dbc2 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -58,25 +58,21 @@ class tftp (
fail('tftp class does not support custom options when inetd is enabled.')
}
- include 'inetd'
-
- augeas { 'inetd_tftp':
- changes => [
- "ins tftp after /files${inetd_conf}",
- "set /files${inetd_conf}/tftp/socket dgram",
- "set /files${inetd_conf}/tftp/protocol udp",
- "set /files${inetd_conf}/tftp/wait wait",
- "set /files${inetd_conf}/tftp/user ${username}",
- "set /files${inetd_conf}/tftp/command /usr/libexec/tftpd",
- "set /files${inetd_conf}/tftp/arguments/1 tftpd",
- "set /files${inetd_conf}/tftp/arguments/2 --address",
- "set /files${inetd_conf}/tftp/arguments/3 ${address}:${port}",
- "set /files${inetd_conf}/tftp/arguments/4 --secure",
- "set /files${inetd_conf}/tftp/arguments/5 ${directory}",
- ],
- require => Class['inetd'],
- }
+ include 'xinetd'
+ xinetd::service { 'tftp':
+ port => $port,
+ protocol => 'udp',
+ server_args => "${options} ${directory}",
+ server => $binary,
+ user => $username,
+ bind => $address,
+ socket_type => 'dgram',
+ cps => '100 2',
+ flags => 'IPv4',
+ per_source => '11',
+ wait => 'yes',
+ }
$svc_ensure = stopped
$svc_enable = false
} else {
@@ -84,9 +80,9 @@ class tftp (
$svc_enable = true
}
- $start = $binary ? {
- undef => undef,
- default => "${binary} -l -a ${address}:${port} -u ${username} ${options} ${directory}"
+ $start = $provider ? {
+ 'base' => "${binary} -l -a ${address}:${port} -u ${username} ${options} ${directory}",
+ default => undef
}
service { 'tftpd-hpa':