File cobbler-2.2.2-reprovision-rhel-on-suse.patch of Package cobbler
Index: cobbler-2.2.2/koan/app.py
===================================================================
--- cobbler-2.2.2.orig/koan/app.py
+++ cobbler-2.2.2/koan/app.py
@@ -881,7 +881,7 @@ class Koan:
(make, version) = utils.os_release()
- if (make == "centos" and version < 6) or (make == "redhat" and version < 6) or (make == "fedora" and version < 10):
+ if (make == "centos" and version < 7) or (make == "redhat" and version < 7) or (make == "fedora" and version < 10) or (make == "suse"):
# embed the initrd in the kickstart file because of libdhcp and/or pump
# needing the help due to some DHCP timeout potential in some certain
@@ -962,7 +962,7 @@ class Koan:
(make, version) = utils.os_release()
- if (make == "centos" and version < 6) or (make == "redhat" and version < 6) or (make == "fedora" and version < 10):
+ if (make == "centos" and version < 7) or (make == "redhat" and version < 7) or (make == "fedora" and version < 10) or (make == "suse"):
# embed the initrd in the kickstart file because of libdhcp and/or pump
# needing the help due to some DHCP timeout potential in some certain
@@ -1066,7 +1066,7 @@ class Koan:
return r"""
cd /var/spool/koan
mkdir initrd
- gzip -dc %s > initrd.tmp
+ gzip -dc %s > initrd.tmp || xz -dc %s > initrd.tmp
if mount -o loop -t ext2 initrd.tmp initrd >&/dev/null ; then
cp ks.cfg initrd/
ln initrd/ks.cfg initrd/tmp/ks.cfg
@@ -1081,7 +1081,7 @@ class Koan:
find . | cpio -o -H newc | gzip -9 > ../initrd_final
echo "...done"
fi
- """ % initrd
+ """ % (initrd, initrd)
#---------------------------------------------------