Commits

Michał Górny committed c754956

GRUB2: support updating autogenerated grub.cfg.

Comments (0)

Files changed (1)

ecleankernel/bootloader/grub2.py

 
 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])