help-cfengine
[Top][All Lists]
Advanced

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

Re: Switching off a shellcommand with empty list variable


From: Eric Sorenson
Subject: Re: Switching off a shellcommand with empty list variable
Date: Fri, 21 Jan 2005 12:35:01 -0800 (PST)

On Fri, 21 Jan 2005, David Baird wrote:

> Joe Moore wrote:
> > [ snip ]
> > shellcommands:
> >    "[ -n '$(missing_ports)' ] && /usr/local/sbin/portupgrade --new
> > $(missing_ports)"
> 
> Thanks! That helps, except that cfengine requires shellcommands to start with
> absolute file paths. Should work if I stick a dummy command like /bin/sleep 0
> at the start.

Use '/usr/bin/test' instead of the bash compare [ -n .. ] construct

-- 

 - Eric Sorenson - Explosive Networking - http://eric.explosive.net -




reply via email to

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