mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 05:35:44 -05:00
binfmt: fix up unnecessary shell and missing quoting at once
This commit is contained in:
parent
02e1b75a79
commit
eb63a6869a
1 changed files with 2 additions and 2 deletions
|
@ -68,7 +68,7 @@ def register(arch: Arch):
|
|||
|
||||
# Register in binfmt_misc
|
||||
logging.info(f"Registering qemu binfmt ({arch})")
|
||||
run_root_cmd(["sh", "-c", f'echo "{code}" > {register} 2>/dev/null'])
|
||||
run_root_cmd(f'echo "{code}" > {register} 2>/dev/null')
|
||||
if not is_registered(arch):
|
||||
logging.debug(f'binfmt line: {code}')
|
||||
raise Exception(f'Failed to register qemu-user for {arch} with binfmt_misc, {binfmt}/{info["name"]} not found')
|
||||
|
@ -82,4 +82,4 @@ def unregister(arch):
|
|||
if not os.path.exists(binfmt_file):
|
||||
return
|
||||
logging.info(f"Unregistering qemu binfmt ({arch})")
|
||||
run_root_cmd(["sh", "-c", f"echo -1 > {binfmt_file}"])
|
||||
run_root_cmd(f"echo -1 > {binfmt_file}")
|
||||
|
|
Loading…
Add table
Reference in a new issue