fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] csh options to behave like 'bash -l -c'


From: Sergi
Subject: Re: [Fab-user] csh options to behave like 'bash -l -c'
Date: Tue, 14 Jul 2009 16:37:53 +0200
User-agent: Thunderbird 2.0.0.21 (X11/20090318)

En/na Tom Evans ha escrit:
> On Mon, 2009-07-13 at 11:41 -0400, Jeff Forcier wrote:
>   
>> Hi Sergi,
>>
>> The two options we pass to "bash" are -l, which just means "be a login
>> shell", and -c, which is only there so that we can pass the actual
>> command string to it (i.e. "bash <my command>" is not possible, so we
>> have to do "bash -c <my command>" instead).
>>
>> I'm not sure what version of csh you're using, but both in (t)csh (on
>> a Mac) and regular csh (on Ubuntu) I'm seeing the -l and -c options
>> and they appear to have the same meaning as in bash.
>>
>> While Fabric is written and tested mostly against bash, I don't see
>> any reason offhand why it should not work in csh, as long as those
>> options are present. If FreeBSD's csh is missing those options, you'll
>> want to read more into its manpage to see what might be even roughly
>> analogous (i.e. if you can even just call csh as "csh <my command>",
>> that might still work) or ask the FreeBSD folks for help.
>>
>> If anyone else on the list is a FBSD/csh user they may also be able to
>> help; unfortunately I'm a bash person so this is as far as I can go :)
>>
>> Best of luck,
>> Jeff
>>
>>
>> On Mon, Jul 13, 2009 at 11:24 AM, Sergi<address@hidden> wrote:
>>     
>>> Hello,
>>>
>>> I am trying to start a deploying project across some freebsd machines
>>> using fabric.
>>> I started by running a simple fabfile and 'run()' command didn't work:
>>>
>>> fab --show=everything remot GRAFICS
>>> [ramoneta] run: ls
>>> [ramoneta] err: ls: No such file or directory.
>>>
>>> Fatal error: run() encountered an error (return code 1) while executing 'ls'
>>>
>>> Aborting.
>>>
>>> after a bit of documentation reading I noticed that env.shell defaults
>>> to '/bin/bash -l -c'. The problem is that freebsd shell users default to
>>> csh.
>>> I compiled the bash port, changed env.shell to '/usr/local/bin/bash -l
>>> -c' and my fabfile.py ran smoothly.
>>> Problem is I can't apply the same arguments with 'csh' and I can't
>>> figure out matching arguments even looking at 'man csh'.
>>>
>>> Is there anything I can do to be able to use 'csh' or I have to switch
>>> to bash to do my deployments?
>>>
>>> Thanks for your help,
>>> regards,
>>> Sergi
>>>
>>>       
>
> FreeBSD user here, I keep meaning to write a patch for the linuxisms,
> but so far none of them have irritated me enough to actually do it :)
>
> I run with this at the top of my fabfiles:
>
> env.shell = '/bin/sh -c'
>
> which has worked fine for the functions I've used, and doesn't require
> bash to be added to all the servers.
>
> Cheers
>
> Tom
>
>
>   
Hi,

yes!, it works with '/bin/sh -c'.

Thanks for your help,
regards,
Sergi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]