Hello togehter
I would like to read out variable repos (cobbler profile dumpvars --name=rhel5-intranet | grep -w repos) in my snippet create_repos_snippet and download a yum repo file if the string is not empty.
 
[root@cobbler sl]# cobbler profile dumpvars --name=rhel5-intranet | grep -w repos
repos : rhel58-x86_64-20120723
<snipp>
   #if 'rhel58' in $repos
      #echo $repos
      wget http://cobbler/pub/files/5_rhel5-updates.repo -O /etc/yum.repos.d/rhel5-updates.repo
   #end if
</snipp>
 
Unfortunately this doesn't work. I have to specifie the whole name of the repo like
 
<snipp>
   #if 'rhel58-x86_64-20120723' in $repos
      #echo $repos
      wget http://cobbler/pub/files/5_rhel5-updates.repo -O /etc/yum.repos.d/rhel5-updates.repo
   #end if
</snipp>
 
Has anybody any idea how to test $repos without using the whole name of the repo? I also tried #if $repos != ' ' without any success.
 
Thank you for your help.
 
Manuel