logo       

Strange issue with if/test bash commands: msg#00182

lang.ruby.capistrano.general

Subject: Strange issue with if/test bash commands


Hi,

I ran in to this issue a few months back and found a workaround but
hitting this again I just thought I would ask here and see if someone
has an explanation for this...

This works:
disable_services.each do |service|
run <<-CMD
if [ -x '/etc/init.d/#{service}' ];then
chkconfig --level 345 #{service} off;
fi
CMD
end



This fails half way through the loop:
disabled_services.each do |service|
run "[[ -x '/etc/init.d/#{service}' ]] && (chkconfig --
level 345 #{service} off;)"
end

??


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise