[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shell command classes don't work?
From: |
Paul Krizak |
Subject: |
Re: shell command classes don't work? |
Date: |
Wed, 05 May 2004 09:36:30 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 |
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