From a8e5b27c76b66fe09cf977e8d97042cd1552a515 Mon Sep 17 00:00:00 2001 From: "Jeffrey M. Levesque" Date: Fri, 8 Dec 2017 18:15:14 -0500 Subject: [PATCH] #557: enable_rpm.pp, adjust 'awk' statement --- .../environment/development/modules/php/manifests/enable_rpm.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/puppet/environment/development/modules/php/manifests/enable_rpm.pp b/puppet/environment/development/modules/php/manifests/enable_rpm.pp index 49d6023a..c80b58b2 100644 --- a/puppet/environment/development/modules/php/manifests/enable_rpm.pp +++ b/puppet/environment/development/modules/php/manifests/enable_rpm.pp @@ -14,7 +14,7 @@ command => "awk '/\[remi-php${version}\]/,/\[remi-test\]/ { if (/enabled=0/) \$0 = \"enabled=1\" }1' ${php_repo} > ${temp_file}", notify => Exec["enable-php-2"], path => '/usr/bin', - onlyif => "awk '/\[remi-php${version}\]/,/\[remi-test\]/ { if (/enabled=0/) exit 0 }1' ${php_repo} > ${temp_file}", + onlyif => "awk 'index(\$0, \"[remi-php56]\") {f=1} index(\$0, \"[remi-test]\") {exit 0} f && /enabled=1/ {exit 1}' ${php_repo}", } exec {'enable-php-2': command => "mv ${working_dir}/remi.tmp /etc/yum.repos.d/remi.repo",