Fix grub() function. Similar section detect by 'root=/dev/' substring

develop
Mike Hiretsky 14 years ago
parent 77d5f78dfc
commit 9d07f26af3

@ -3122,10 +3122,10 @@ os_disk_install not found mount point '\' and '\%s'")%mountPoint)
reGrubEntry = re.compile("title.*?(?=title|$)", re.S | re.I )
grubconf = reRemoveComments.sub("",open(pathGrubConf,'r').read())
roothd = filter(lambda x: x[1] == '/',
zip(self.objVar.Get('os_disk_grub'),
zip(self.objVar.Get('os_disk_dev'),
self.objVar.Get('os_install_disk_mount')))
if roothd:
roothd = "root (hd%s)" % roothd[0][0]
roothd = "root=%s" % roothd[0][0]
replace = ("".join(filter(lambda x: not roothd in x,
reGrubEntry.findall(grubconf)))).strip()
textTemplateTmp = textTemplateTmp[:resS.start()] + replace +\

Loading…
Cancel
Save