Re: Re: Cobbler reposync cron script

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

 




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.

	-s-

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux