[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shellcommands returns 256, not 0
From: |
Mark . Burgess |
Subject: |
Re: shellcommands returns 256, not 0 |
Date: |
Tue, 20 Apr 2004 06:36:19 +0200 (MEST) |
This is a documented parser bug, you can do
have_etc = ( IsDir(${etc_dir}) )
with curly braces instead. It's not easy to fix.
M
On 19 Apr, David Kewley wrote:
> David Kewley wrote on Monday 19 April 2004 14:44:
>> Christian Pearce wrote on Monday 19 April 2004 13:30:
>> > I would suggest using groups
>> >
>> > IsDir(f)
>> > True if the named file object is a directory.
>>
>> Thanks, that's a good suggestion, and I'll do it instead of the first
>> shellcommand.
>
> Unfortunately, IsDir seems to need an explicit directory string, as in
>
> IsDir(/etc)
>
> It seems you can't do:
>
> control:
>
> etc_dir = ( "/etc" )
>
> classes:
>
> have_etc = ( IsDir($(etc_dir)) )
>
> I tried that and also using IsDir("$(etc_dir)"). Neither worked; the class
> never got defined. IsDir(/etc) worked fine.
>
> Suggestions? If not, I'm back to my shellcommand "test -d $(etc_dir)". :)
>
> David
>
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272 Email: Mark.Burgess@iu.hio.no
Fax : +47 22453205 WWW : http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- shellcommands returns 256, not 0, David Kewley, 2004/04/19
- Re: shellcommands returns 256, not 0, Christian Pearce, 2004/04/19
- Re: shellcommands returns 256, not 0, David Kewley, 2004/04/19
- Re: shellcommands returns 256, not 0, David Kewley, 2004/04/19
- Re: shellcommands returns 256, not 0, Marion Hakanson, 2004/04/19
- Re: shellcommands returns 256, not 0, Brendan Strejcek, 2004/04/19
- Re: shellcommands returns 256, not 0, Chris Edillon, 2004/04/19
- Re: shellcommands returns 256, not 0,
Mark . Burgess <=