X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fxinetd%2Ftemplates%2Fservice.erb;h=0d89e8f4132fdf066d7903848c65a27166e152d2;hb=93a102d0bd065f74e3489b7445cf400f9d779466;hp=9478c1d138aaba88e3c6e284539742b5c12f1f13;hpb=7a4cbc61f8675820b8d5711d8fcfd5aeb2145aab;p=mirror%2Fdsa-puppet.git diff --git a/modules/xinetd/templates/service.erb b/modules/xinetd/templates/service.erb index 9478c1d13..0d89e8f41 100644 --- a/modules/xinetd/templates/service.erb +++ b/modules/xinetd/templates/service.erb @@ -1,10 +1,13 @@ -service <%= scope.lookupvar('port') %> +service <%= scope.lookupvar('services') %> { <%- if scope.lookupvar('bind') != '' -%> bind = <%= scope.lookupvar('bind') %> <%- end -%> <%- if scope.lookupvar('type') != '' -%> type = <%= scope.lookupvar('type') %> +<%- end -%> +<%- if scope.lookupvar('port') != '' -%> + port = <%= scope.lookupvar('port') %> <%- end -%> id = <%= scope.lookupvar('id') %> @@ -12,7 +15,7 @@ service <%= scope.lookupvar('port') %> protocol = <%= scope.lookupvar('protocol') %> <%- if scope.lookupvar('flags') != '' -%> flags = <%= scope.lookupvar('flags') %> -<%- elsif scope.lookupvar('bind') =~ ':' -%> +<%- elsif scope.lookupvar('bind') =~ /:/ or scope.lookupvar('bind') == "" -%> flags = IPv6 <%- end -%> wait = <%= scope.lookupvar('wait') %>