From: Peter Palfrader Date: Mon, 24 Jun 2013 19:24:42 +0000 (+0200) Subject: Try to handle xinetd flags sanely X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;ds=sidebyside;h=7a4cbc61f8675820b8d5711d8fcfd5aeb2145aab;p=mirror%2Fdsa-puppet.git Try to handle xinetd flags sanely --- 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') != '' -%>