Try to handle xinetd flags sanely
[mirror/dsa-puppet.git] / modules / xinetd / templates / service.erb
index 33a9de7..9478c1d 100644 (file)
@@ -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') != '' -%>