[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shell command classes don't work?
From: |
Christian Pearce |
Subject: |
Re: shell command classes don't work? |
Date: |
Wed, 05 May 2004 11:42:19 -0400 |
Oh yea, let's not forget we need ReturnsZero().
groups:
sudo_installed = ( ReturnsZero(${pkginfo} -q SMCsudo) )
On Wed, 2004-05-05 at 10:36, Paul Krizak wrote:
> I've experienced this problem, too.
>
> I believe the problem is because the shell commands that are allowed in
> 'classes' are just commands -- you're not allowed to use any
> metacharacters or anything. Not sure why, but a simple command with no
> metacharacters works fine, and something with "grep" like you have
> doesn't work. My workaround looks like this:
>
> import:
>
> cf.classes
>
> control:
>
> actionsequence = ( shellcommands )
>
> chkfontpath = ( /usr/sbin/chkfontpath )
> grep = ( /bin/grep )
>
> shellcommands:
>
> redhat_7_3::
> "$(chkfontpath) --list | $(grep) -q cyrillic"
> define=broken_fontpath
>
> broken_fontpath::
> "$(chkfontpath) -r /usr/X11R6/lib/X11/fonts/cyrillic"
> "$(chkfontpath) -r /usr/X11R6/lib/X11/fonts/CID"
> "$(chkfontpath) -r /usr/X11R6/lib/X11/fonts/local"
> "$(chkfontpath) -r /usr/X11R6/lib/X11/fonts/latin2/Type1"
>
> Paul Krizak 5900 E. Ben White Blvd. MS 625
> Advanced Micro Devices Austin, Tx 78741
> MPD Linux Systems Co-Op Phone: (512) 602-5860
> Paul.Krizak@amd.com Cell: (512) 791-0686
>
>
>
> Kai Grossjohann wrote:
>
> >I've got the following file /home/kgrossjo/tmp/cfagent.conf:
> >
> >control:
> > actionsequence = ( shellcommands )
> >
> >classes:
> > x = ( '/usr/bin/lspci | /bin/grep -q "Intel.*PRO/100 VE"' )
> >
> >shellcommands:
> > x::
> > "/bin/echo yes"
> >
> >Below, you can find the output that's generated. Why does this fail
> >to define the class x?
> >
> >This is using the cfengine2 package from Debian unstable.
> >
> >Kai
> >
> >
> >
>
>
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine
--
Christian Pearce
http://www.commnav.com
http://www.perfectorder.com