Permalink
Browse files

added an Exec that fixes the path so I don't need to do full path names.

TODO: Do this everywhere.
limed | uberj: https://gist.github.com/1414068
  • Loading branch information...
1 parent 4ba4fc5 commit 9c63054deed1173786f1a88f9eeefc7382d64c55 @uberj committed Dec 1, 2011
Showing with 7 additions and 6 deletions.
  1. +7 −6 php_apd/manifests/init.pp
View
@@ -5,6 +5,7 @@
$php_ini = "/etc/php5/cli/php.ini",
$trace_dir = "/tmp/apd_traces" )
{
+ Exec { path => "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" }
package {'php5':
ensure => present,
@@ -21,16 +22,16 @@
#apd.statement=1
#apd.tracedir=/tmp/apd-traces
exec { 'zend_extensions':
- unless => "/bin/grep zend_extension=/usr/lib/php5/20090626+lfs/apd.so ${php_ini}",
- command => "/bin/echo 'zend_extension=/usr/lib/php5/20090626+lfs/apd.so' >> ${php_ini}",
+ unless => "grep zend_extension=/usr/lib/php5/20090626+lfs/apd.so ${php_ini}",
+ command => "echo 'zend_extension=/usr/lib/php5/20090626+lfs/apd.so' >> ${php_ini}",
}
exec { 'apd enable':
- unless => "/bin/grep apd.statement=1 ${php_ini}",
- command => "/bin/echo 'apd.statement=1' >> ${php_ini}",
+ unless => "grep apd.statement=1 ${php_ini}",
+ command => "echo 'apd.statement=1' >> ${php_ini}",
}
exec { 'tracedir':
- unless => "/bin/grep apd.tracedir=${trace_dir} ${php_ini}",
- command => "/bin/echo 'apd.tracedir=${trace_dir}' >> ${php_ini}",
+ unless => "grep apd.tracedir=${trace_dir} ${php_ini}",
+ command => "echo 'apd.tracedir=${trace_dir}' >> ${php_ini}",
}
}
}

0 comments on commit 9c63054

Please sign in to comment.