From: Peter Palfrader Date: Mon, 24 Jun 2013 19:23:09 +0000 (+0200) Subject: Try to handle xinetd flags sanely X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=aae8b555c902a217d68dc96ccd50ae6144e8e686;p=mirror%2Fdsa-puppet.git Try to handle xinetd flags sanely --- diff --git a/modules/rsync/manifests/site.pp b/modules/rsync/manifests/site.pp index bb2ee1446..6a4284a3c 100644 --- a/modules/rsync/manifests/site.pp +++ b/modules/rsync/manifests/site.pp @@ -1,5 +1,6 @@ define rsync::site ( $bind='', + $bind6='', $source='', $content='', $fname='', @@ -39,6 +40,7 @@ define rsync::site ( xinetd::service { "rsync-${name}": bind => $bind, + bind6 => $bind6, id => "${name}-rsync", server => '/usr/bin/rsync', port => 'rsync', diff --git a/modules/xinetd/manifests/service.pp b/modules/xinetd/manifests/service.pp index 522af17c4..5c8f954ad 100644 --- a/modules/xinetd/manifests/service.pp +++ b/modules/xinetd/manifests/service.pp @@ -6,7 +6,7 @@ define xinetd::service ( $type='', $socket_type=stream, $protocol=tcp, - $flags=IPv6, + $flags='', $wait=no, $user=root, $group='', diff --git a/modules/xinetd/templates/service.erb b/modules/xinetd/templates/service.erb index 33a9de7a4..9478c1d13 100644 --- a/modules/xinetd/templates/service.erb +++ b/modules/xinetd/templates/service.erb @@ -10,7 +10,11 @@ service <%= scope.lookupvar('port') %> socket_type = <%= scope.lookupvar('socket_type') %> protocol = <%= scope.lookupvar('protocol') %> +<%- if scope.lookupvar('flags') != '' -%> flags = <%= scope.lookupvar('flags') %> +<%- elsif scope.lookupvar('bind') =~ ':' -%> + flags = IPv6 +<%- end -%> wait = <%= scope.lookupvar('wait') %> user = <%= scope.lookupvar('user') %> <%- if scope.lookupvar('group') != '' -%>