Fixed inetd module for OpenBSD.
This commit is contained in:
parent
e00971ce3f
commit
87b2350bae
1 changed files with 17 additions and 2 deletions
|
@ -49,8 +49,9 @@ class inetd::server::xinetd {
|
||||||
class inetd::server::inetd {
|
class inetd::server::inetd {
|
||||||
|
|
||||||
service { "inetd":
|
service { "inetd":
|
||||||
ensure => running,
|
ensure => running,
|
||||||
enable => true,
|
start => "inetd",
|
||||||
|
enable => true,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -83,6 +84,20 @@ define inetd::service($ensure = present) {
|
||||||
notify => Service["xinetd"],
|
notify => Service["xinetd"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
openbsd: {
|
||||||
|
exec { "enable-inetd-${name}":
|
||||||
|
command => $ensure ? {
|
||||||
|
"present" => "ruby -pi -e 'sub(/^#${name}(\\s+)/, \"${name}\\\1\")' /etc/inetd.conf",
|
||||||
|
"absent" => "ruby -pi -e 'sub(/^${name}(\\s+)/, \"#${name}\\\1\")' /etc/inetd.conf",
|
||||||
|
},
|
||||||
|
unless => $ensure ? {
|
||||||
|
"present" => "egrep '^tftp[[:space:]]' /etc/inetd.conf",
|
||||||
|
"absent" => "egrep '^#tftp[[:space:]]' /etc/inetd.conf",
|
||||||
|
},
|
||||||
|
path => "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin",
|
||||||
|
notify => Service["inetd"],
|
||||||
|
}
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
fail("Inetd module not supported in ${operatingsystem}")
|
fail("Inetd module not supported in ${operatingsystem}")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue