This commit is contained in:
Marc Beninca 2024-02-16 21:55:09 +01:00
parent e11b92e57b
commit 4961209719
3 changed files with 9 additions and 10 deletions

View file

@ -1,6 +1,5 @@
import os import os
import shutil import shutil
import subprocess
import ps import ps
@ -21,18 +20,18 @@ def empty_file(path: str):
def get_mount_uuid(path: str): def get_mount_uuid(path: str):
return ps.run_line( return ps.run_line(
('findmnt'), ('findmnt',),
('--noheadings'), ('--noheadings',),
('--output', 'UUID'), ('--output', 'UUID'),
(path), (path,),
) )
def get_path_mount(path: str): def get_path_mount(path: str):
return ps.run_line( return ps.run_line(
('stat'), ('stat',),
('--format', '%m'), ('--format', '%m'),
(path), (path,),
) )

View file

@ -10,8 +10,8 @@ ENV_HEADER = f'''{ENV_COMMENT} GRUB Environment Block
''' '''
MODULES = { MODULES = {
'i386-pc': [ 'i386-pc': [
('biosdisk'), ('biosdisk',),
('ntldr'), ('ntldr',),
] ]
} }
@ -19,7 +19,7 @@ MODULES = {
def make_image(image_format: str, image_path: str, modules: list[str], def make_image(image_format: str, image_path: str, modules: list[str],
memdisk_path: str, pubkey_path: str = None) -> None: memdisk_path: str, pubkey_path: str = None) -> None:
args = [ args = [
('grub-mkimage'), ('grub-mkimage',),
('--compress', COMPRESSION), ('--compress', COMPRESSION),
('--format', image_format), ('--format', image_format),
('--output', image_path), ('--output', image_path),