Fixed error "Unrecognised escape sequence '\1'" from inetd module.

This commit is contained in:
Timo Mkinen 2011-05-06 09:01:08 +03:00
parent 6f828786eb
commit 3b4040d862

View file

@ -87,8 +87,8 @@ define inetd::service($ensure = present) {
openbsd: { openbsd: {
exec { "enable-inetd-${name}": exec { "enable-inetd-${name}":
command => $ensure ? { command => $ensure ? {
"present" => "ruby -pi -e 'sub(/^#${name}(\\s+)/, \"${name}\\\1\")' /etc/inetd.conf", "present" => "ruby -pi -e 'sub(/^#${name}(\\s+)/, \"${name}\\\\1\")' /etc/inetd.conf",
"absent" => "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 ? { unless => $ensure ? {
"present" => "egrep '^tftp[[:space:]]' /etc/inetd.conf", "present" => "egrep '^tftp[[:space:]]' /etc/inetd.conf",