[OpenAFS] Re: howto release all projects by cron

Andrew Deason adeason@sinenomine.net
Mon, 25 Jan 2010 09:14:25 -0600


On Mon, 25 Jan 2010 15:12:00 +0100 (CET)
Alena Manova <nymano@seznam.cz> wrote:

> but this fails (added parameter to the ls command):
> 
> bos create <mysrv> releaseproj cron -cmd "/bin/bash -c '/bin/ls /tmp'"
> "now"
> (Mon Jan 25 14:08:02 2010: releaseproj exited with code 2)

The bosserver command parser is very limited. It doesn't understand the
concept of quoting arguments to have spaces in them; it just always
separates arguments by spaces. So this gets passed to bash with -c as
the first argument, '/bin/ls as the second argument, and /tmp' as the
third.

It is still possible to make a cron bnode in this example like so:

bos create <mysrv> releaseproj cron -cmd "/bin/bash -c /bin/ls /tmp" now

but that's just due to the way 'bash -c' works, and may not work for
everything. I don't think it will work in the more complex releaseproj
example; the way around it is just to use a script.

-- 
Andrew Deason
adeason@sinenomine.net