Each expression returns a value.

Your first example that works is of the form a -> b
So when a is false,  the expression is still true

Your second example is a & b
If a is false, the expression is false

Since the return is not true, the command has failed and capistrano stops.

One of your disabled services does not have an executable entry in
/etc/init.d, so the test returns false, and so does the command.

Shawn



On Nov 29, 2007 3:39 PM, heimdull <[EMAIL PROTECTED]> wrote:
>
> 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
>
> ??
> >
>

--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to