Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from blkperl/rebase_pdxcat
Rebase pdxcat/xinetd against new upstream
- Loading branch information
Showing
9 changed files
with
187 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
fixtures: | ||
repositories: | ||
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib" | ||
symlinks: | ||
"xinetd": "#{source_dir}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
class xinetd::params { | ||
|
||
case $::osfamily { | ||
'Debian': { | ||
$confdir = '/etc/xinetd.d' | ||
$conffile = '/etc/xinetd.conf' | ||
$package_name = 'xinetd' | ||
$service_name = 'xinetd' | ||
} | ||
'FreeBSD': { | ||
$confdir = '/usr/local/etc/xinetd.d' | ||
$conffile = '/usr/local/etc/xinetd.conf' | ||
$package_name = 'security/xinetd' | ||
$service_name = 'xinetd' | ||
} | ||
'Suse': { | ||
$confdir = '/etc/xinetd.d' | ||
$conffile = '/etc/xinetd.conf' | ||
$package_name = 'xinetd' | ||
$service_name = 'xinetd' | ||
} | ||
'RedHat': { | ||
$confdir = '/etc/xinetd.d' | ||
$conffile = '/etc/xinetd.conf' | ||
$package_name = 'xinetd' | ||
$service_name = 'xinetd' | ||
} | ||
default: { | ||
fail("xinetd: module does not support osfamily ${::osfamily}") | ||
} | ||
} | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
require 'spec_helper' | ||
|
||
describe 'xinetd' do | ||
|
||
let :facts do | ||
{ :osfamily => 'Debian' } | ||
end | ||
|
||
it { | ||
should contain_package('xinetd') | ||
should contain_file('/etc/xinetd.conf') | ||
should contain_service('xinetd').with_restart('/etc/init.d/xinetd reload') | ||
should contain_service('xinetd') | ||
} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,51 @@ | ||
# This file is being maintained by Puppet. | ||
# DO NOT EDIT | ||
|
||
service <%= @name %> | ||
service <%= @service_name %> | ||
{ | ||
port = <%= @port %> | ||
disable = <%= @disable %> | ||
socket_type = <%= @socket_type %> | ||
protocol = <%= @protocol %> | ||
wait = <%= @mywait %> | ||
wait = <%= @_wait %> | ||
user = <%= @user %> | ||
group = <%= @group %> | ||
groups = <%= @groups %> | ||
server = <%= @server %> | ||
<% if @bind -%> | ||
bind = <%= @bind %> | ||
<% if @server_args %> server_args = <%= @server_args %><% end %> | ||
<% if @per_source %> per_source = <%= @per_source %><% end %> | ||
<% if @log_on_failure %> log_on_failure += <%= @log_on_failure %><% end %> | ||
<% if @cps %> cps = <%= @cps %><% end %> | ||
<% if @flags %> flags = <%= @flags %><% end %> | ||
<% if @service_type %> type = <%= @service_type %><% end %> | ||
<% end -%> | ||
<% if @service_type -%> | ||
type = <%= @service_type %> | ||
<% end -%> | ||
<% if @server_args -%> | ||
server_args = <%= @server_args %> | ||
<% end -%> | ||
<% if @only_from -%> | ||
only_from = <%= @only_from %> | ||
<% end -%> | ||
<% if @per_source -%> | ||
per_source = <%= @per_source %> | ||
<% end -%> | ||
<% if @log_on_failure -%> | ||
log_on_failure += <%= @log_on_failure %> | ||
<% end -%> | ||
<% if @cps -%> | ||
cps = <%= @cps %> | ||
<% end -%> | ||
<% if @flags -%> | ||
flags = <%= @flags %> | ||
<% end -%> | ||
<% if @xtype -%> | ||
type = <%= @xtype %> | ||
<% end -%> | ||
<% if @no_access -%> | ||
no_access = <%= @no_access %> | ||
<% end -%> | ||
<% if @access_times -%> | ||
access_times = <%= @access_times %> | ||
<% end -%> | ||
<% if @log_type -%> | ||
log_type = <%= @log_type %> | ||
<% end -%> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,5 +48,4 @@ defaults | |
# banner_success = | ||
} | ||
|
||
includedir /etc/xinetd.d | ||
|
||
includedir <%= @confdir %> |