help-cfengine
[Top][All Lists]
Advanced

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

Switching off a shellcommand with empty list variable


From: David Baird
Subject: Switching off a shellcommand with empty list variable
Date: Thu, 20 Jan 2005 22:47:55 +0000
User-agent: Mozilla Thunderbird 0.9 (Windows/20041103)

Hi,

I have a list variable that I define in a control section:, and then use it to install ports (this is FreeBSD):

control:
    missing_ports = ( ExecResult(/usr/bin/perl -e blah) )

shellcommands:

  "/usr/local/sbin/portupgrade --new $(missing_ports)"


The perl one-liner returns a colon-separated list of ports that need to be installed. The problem is that if there are no missing ports, the shellcommand still gets called. Is there any way I can set a class if $(missing_ports) is empty?

Thanks,

d.




reply via email to

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