1. Michał Górny
  2. eclean-kernel

Commits

Michał Górny  committed c754956

GRUB2: support updating autogenerated grub.cfg.

  • Participants
  • Parent commits 17f7309
  • Branches master

Comments (0)

Files changed (1)

File ecleankernel/bootloader/grub2.py

View file
  • Ignore whitespace
 
 from __future__ import print_function
 
+import subprocess
+
 from .grub import GRUB
 
 grub2_autogen_header = '''#
 
 		if self._autogen:
 			self._debug.print('Config is autogenerated, ignoring')
+			self.postrm = self._postrm
 			return ()
 		return GRUB._get_kernels(self, content)
+
+	def _postrm(self):
+		self._debug.print('Calling grub2-mkconfig')
+		subprocess.call(['grub2-mkconfig', '-o', self.path])