I noticed that the symlinks in the links dir for ESX hosts being
replicated were linking to /var/www/cobbler/ks_mirror instead of the
distro. The link_distro function in utils.py does this:
dirname = os.path.dirname(distro.kernel)
base = os.path.split(os.path.split(dirname)[0])[0]
dest_link = os.path.join(settings.webdir, "links", distro.name)
VMware Kernel : /var/www/cobbler/ks_mirror/esx-4.1-x86_64/isolinux/vmlinuz
RHEL Kernel : /var/www/cobbler/ks_mirror/rhel6.1-x86_64/images/pxeboot/vmlinuz
>> import os
>> dirname =
os.path.dirname("/var/www/cobbler/ks_mirror/rhel6.1-x86_64/images/pxeboot/vmlinuz")
>> base = os.path.split(os.path.split(dirname)[0])[0]
>> print base
/var/www/cobbler/ks_mirror/rhel6.1-x86_64
>> dirname =
os.path.dirname("/var/www/cobbler/ks_mirror/esx-4.1-x86_64/isolinux/vmlinuz")
>> base = os.path.split(os.path.split(dirname)[0])[0]
>> print base
/var/www/cobbler/ks_mirror
>>
This patch should hopefully make it work for all distros.
Thanks,
Jonathan