Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 521756
Collapse All | Expand All

(-)a/ecleankernel/bootloader/grub2.py (-6 / +6 lines)
Lines 8-25 Link Here
8
8
9
from .grub import GRUB
9
from .grub import GRUB
10
10
11
grub2_autogen_header = '''#
11
grub_autogen_header = '''#
12
# DO NOT EDIT THIS FILE
12
# DO NOT EDIT THIS FILE
13
#
13
#
14
# It is automatically generated by grub2-mkconfig'''
14
# It is automatically generated by grub2-mkconfig'''
15
15
16
class GRUB2(GRUB):
16
class GRUB2(GRUB):
17
	name = 'grub2'
17
	name = 'grub'
18
	kernel_re = r'^\s*linux\s*(\([^)]+\))?(?P<path>\S+)'
18
	kernel_re = r'^\s*linux\s*(\([^)]+\))?(?P<path>\S+)'
19
	def_path = ('/boot/grub/grub.cfg', '/boot/grub2/grub.cfg')
19
	def_path = ('/boot/grub/grub.cfg', '/boot/grub/grub.cfg')
20
20
21
	def _get_kernels(self, content):
21
	def _get_kernels(self, content):
22
		self._autogen = content.startswith(grub2_autogen_header)
22
		self._autogen = content.startswith(grub_autogen_header)
23
23
24
		if self._autogen:
24
		if self._autogen:
25
			self._debug.print('Config is autogenerated, ignoring')
25
			self._debug.print('Config is autogenerated, ignoring')
Lines 29-33 Link Here
29
29
30
	def _postrm(self):
30
	def _postrm(self):
31
		if self._autogen:
31
		if self._autogen:
32
			self._debug.print('Calling grub2-mkconfig')
32
			self._debug.print('Calling grub-mkconfig')
33
			subprocess.call(['grub2-mkconfig', '-o', self.path])
33
			subprocess.call(['grub-mkconfig', '-o', self.path])

Return to bug 521756