define xinetd::service (
$id,
$server,
- $port,
+ $service,
+ $port='',
$bind='',
$type='',
$socket_type=stream,
$protocol=tcp,
- $flags=IPv6,
+ $flags='',
$wait=no,
$user=root,
$group='',
}
if $ferm {
+ $fermport = $port ? {
+ "" => $service,
+ default => $port
+ }
+
@ferm::rule { "dsa-xinetd-${name}":
- description => "Allow traffic to ${port}",
- rule => "&SERVICE(${protocol}, ${port})"
+ description => "Allow traffic to ${service}",
+ rule => "&SERVICE(${protocol}, ${fermport})"
}
}