+ candidates=[]
+ # f16/18: expect initramfs image here
+ candidates.append ("/boot/initramfs-%s.img"%(kversion))
+ # f20: uses a uid of some kind, e.g. /boot/543f88c129de443baaa65800cf3927ce/<kversion>/initrd
+ candidates.append ("/boot/*/%s/initrd"%(kversion))
+ def find_file_in_sysimg (candidates):
+ import glob
+ for pattern in candidates:
+ matches=glob.glob(SYSIMG_PATH+pattern)
+ log.write("locating initrd: found %d matches in %s\n"%(len(matches),pattern))
+ if matches: return matches[0]
+ initrd=find_file_in_sysimg(candidates)
+ if initrd:
+ utils.sysexec( "cp %s /tmp/initrd" % initrd, log )
+ else:
+ raise Exception,"Unable to locate initrd - bailing out"