Matt Hyclak wrote:
On Thu, Jun 12, 2008 at 08:38:42AM -0700, Sandor W. Sklar enlightened us:
On Jun 12, 2008, at 8:24 AM, Robin Bowes wrote:
Michael DeHaan wrote:
Adrian Revill wrote:
for name in $(awk '/name:/ {print($2)}' /var/lib/cobbler/repos)
do
run $name
done
One small change I'd make is to make the last awk line run 'cobbler
repo list' instead of grepping the file, that way
it works regardless of the storage backend -- though everyone
pretty much uses the stock one.
As I always say, if it looks too complicated, there's probably a
better way to do it:
for name in `cobbler repo list`
do
run $name
done
... and I'm not sure why:
cobbler reposync > /dev/null
... isn't sufficient. Is there an advantage to doing the repos one at
a time? I've got the above. If everything works, I get no email. If
there is a problem, it gets sent to stderr, so I get email.
cobbler stops processing the remaining repos if it hits an error in one, so
doing them one at a time allows the others to complete.
That's something we can do in the code later, no doubt. Until then, this
does the job. The great thing is it doesn't really matter if it's Python
or shell as long as it works :)
I'll see about adding a --retries to reposync in the future. I believe
there is already an RFE for a flag to skip the ones that
fail without blocking the rest.
Matt
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools