[et-mgmt-tools] Re: Cobbler reposync cron script

Robin Bowes robin-lists at robinbowes.com
Thu Jun 12 15:24:18 UTC 2008


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

R.




More information about the et-mgmt-tools mailing list