From c3d0b8b46f1cf9ed1b00660bacd1ebbcd96800da Mon Sep 17 00:00:00 2001 From: crayfishx Date: Tue, 10 Jul 2012 14:27:10 -0700 Subject: Removing dependancy on 'inetd' which doesn't exist in the forge... Replaced with xinetd::service to set up the xinetd configuration --- manifests/init.pp | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) (limited to 'manifests') 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': -- cgit v1.2.3