Bugfix to function grub() for templates

develop
Самоукин Алексей 14 years ago
parent 090bd556fe
commit 210fbea7e1

@ -3117,13 +3117,13 @@ os_disk_install not found mount point '\' and '\%s'")%mountPoint)
cl_overriding.exit(1)
pathGrubConf = "/boot/grub/grub.conf"
replace = ""
if access(pathGrubConf,R_OK):
if os.access(pathGrubConf,os.R_OK):
reRemoveComments = re.compile("(^|\n)\s*#[^\n]*?(?=\n|$)", re.S)
reGrubEntry = re.compile("title.*?(?=title|$)", re.S | re.I )
grubconf = reRemoveComments.sub("",open(pathGrubConf,'r').read())
roothd = filter(lambda x: x[1] == '/',
zip(self.Get('os_disk_grub'),
self.Get('os_install_disk_mount')))
zip(self.objVar.Get('os_disk_grub'),
self.objVar.Get('os_install_disk_mount')))
if roothd:
roothd = "root (hd%s)" % roothd[0][0]
replace = ("".join(filter(lambda x: not roothd in x,

Loading…
Cancel
Save