Fixed inetd module for OpenBSD.

This commit is contained in:
Timo Mkinen 2011-03-15 00:31:40 +02:00
parent e00971ce3f
commit 87b2350bae

View file

@ -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}")
}