Fixed inetd module for OpenBSD.
This commit is contained in:
parent
e00971ce3f
commit
87b2350bae
1 changed files with 17 additions and 2 deletions
|
@ -50,6 +50,7 @@ class inetd::server::inetd {
|
|||
|
||||
service { "inetd":
|
||||
ensure => running,
|
||||
start => "inetd",
|
||||
enable => true,
|
||||
}
|
||||
|
||||
|
@ -83,6 +84,20 @@ define inetd::service($ensure = present) {
|
|||
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: {
|
||||
fail("Inetd module not supported in ${operatingsystem}")
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue