From 2d45a97153ba480f60ba662a2496ee2d1977368e Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Wed, 10 Sep 2014 10:39:36 +0300 Subject: [PATCH] inetd: Fix absent service disable from inetd.conf. --- inetd/manifests/init.pp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inetd/manifests/init.pp b/inetd/manifests/init.pp index 24fe6d2..b4bc0c9 100644 --- a/inetd/manifests/init.pp +++ b/inetd/manifests/init.pp @@ -104,7 +104,11 @@ define inetd::service($ensure = present) { }, unless => $ensure ? { "present" => "egrep '^${name}[[:space:]]' /etc/inetd.conf", - "absent" => "egrep '^#${name}[[:space:]]' /etc/inetd.conf", + "absent" => undef, + }, + onlyif => $ensure ? { + "present" => undef, + "absent" => "egrep '^${name}[[:space:]]' /etc/inetd.conf", }, path => "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin", notify => Service["inetd"],