Choose what kernel to use for the autoinstaller based on what dom0 is
[invirt/packages/invirt-xen-config.git] / invirt-database
index ba97ed6..b914701 100644 (file)
@@ -52,8 +52,10 @@ else:
 if 'installer_options' in locals(): #Installer
     disk.append('phy:/dev/xenvg/s_install_hda,hdb,r')
 
-    kernel = '/boot/vmlinuz-2.6.24-19-xen' #From hardy
-    ramdisk = '/boot/initrd.img-2.6.24-19-xen'
+    import os
+    release = os.uname()[2]
+    kernel = '/boot/vmlinuz-%s' % release
+    ramdisk = '/boot/initrd.img-%s' % release
 
     if not machine.nics:
         raise RuntimeError('You must have a nic to autoinstall')