help-cfengine
[Top][All Lists]
Advanced

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

Re: shellcommands returns 256, not 0


From: David Kewley
Subject: Re: shellcommands returns 256, not 0
Date: Mon, 19 Apr 2004 16:22:03 -0700
User-agent: KMail/1.5

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




reply via email to

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