Skip to content

Commit

Permalink
change default user/group model
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Lyons committed Sep 2, 2014
1 parent 99a0c12 commit fae5548
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
35 changes: 22 additions & 13 deletions manifests/params.pp
@@ -1,21 +1,24 @@
class xinetd::params {
$default_user = 'root'
$default_group = 'root'
# $default_user = 'root'
# $default_group = 'root'

case $::osfamily {
'Debian': {
$confdir = '/etc/xinetd.d'
$conffile = '/etc/xinetd.conf'
$default_user = 'root'
$default_group = 'root'
$package_name = 'xinetd'
$service_hasrestart = true
$service_hasstatus = false
$service_name = 'xinetd'
$service_restart = "/usr/sbin/service ${service_name} reload"
}
'FreeBSD': {
$group = 'wheel'
$confdir = '/usr/local/etc/xinetd.d'
$conffile = '/usr/local/etc/xinetd.conf'
$default_user = 'root'
$default_group = 'wheel'
$package_name = 'security/xinetd'
$service_hasrestart = false
$service_hasstatus = true
Expand All @@ -24,6 +27,8 @@
'Suse': {
$confdir = '/etc/xinetd.d'
$conffile = '/etc/xinetd.conf'
$default_user = 'root'
$default_group = 'root'
$package_name = 'xinetd'
$service_hasrestart = true
$service_hasstatus = false
Expand All @@ -33,6 +38,8 @@
'RedHat': {
$confdir = '/etc/xinetd.d'
$conffile = '/etc/xinetd.conf'
$default_user = 'root'
$default_group = 'root'
$package_name = 'xinetd'
$service_hasrestart = true
$service_hasstatus = true
Expand All @@ -42,10 +49,12 @@
'Linux': {
case $::operatingsystem {
'Amazon': {
$confdir = '/etc/xinetd.d'
$conffile = '/etc/xinetd.conf'
$package_name = 'xinetd'
$service_name = 'xinetd'
$confdir = '/etc/xinetd.d'
$conffile = '/etc/xinetd.conf'
$default_user = 'root'
$default_group = 'root'
$package_name = 'xinetd'
$service_name = 'xinetd'
}
default: {
fail("xinetd: module does not support Linux operatingsystem ${::operatingsystem}")
Expand All @@ -57,11 +66,11 @@
}
}
if $user == undef {
$user = $default_user
}
# if $user == undef {
# $user = $default_user
# }
if $group == undef {
$group = $default_group
}
# if $group == undef {
# $group = $default_group
# }
}
4 changes: 2 additions & 2 deletions manifests/service.pp
Expand Up @@ -72,14 +72,14 @@
$cps = undef,
$disable = 'no',
$flags = undef,
$group = $xinetd::params::group,
$group = $xinetd::params::default_group,
$groups = 'yes',
$instances = 'UNLIMITED',
$per_source = undef,
$protocol = 'tcp',
$server_args = undef,
$socket_type = 'stream',
$user = $xinetd::params::user,
$user = $xinetd::params::default_user,
$only_from = undef,
$wait = undef,
$xtype = undef,
Expand Down

0 comments on commit fae5548

Please sign in to comment.