From b53795bddb1b39976e0a0398f814acdfabf8d645 Mon Sep 17 00:00:00 2001 From: Rudra Saraswat Date: Thu, 2 Apr 2026 00:58:28 +0100 Subject: [PATCH] fix: execute after-stages commands as host --- usr/lib/akshara/utils/gen_rootfs.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/usr/lib/akshara/utils/gen_rootfs.py b/usr/lib/akshara/utils/gen_rootfs.py index 120bf3f..a8090dd 100644 --- a/usr/lib/akshara/utils/gen_rootfs.py +++ b/usr/lib/akshara/utils/gen_rootfs.py @@ -1,5 +1,6 @@ import json import os +import subprocess from classes.rootfs import RootFS @@ -34,7 +35,12 @@ def gen_rootfs(system_config: dict, rootfs_path: str) -> RootFS: run_script_rootfs(rootfs, modules[stage["module"]], inputs) if isinstance(system_config["distro-config"].get("after-stages"), str): - run_script_rootfs(rootfs, system_config["distro-config"]["after-stages"], []) + subprocess.run( + ["bash", "-s"], + text=True, + input=system_config["distro-config"]["after-stages"], + cwd=str(rootfs_path), + ) with open(os.path.join(rootfs_path, "usr/system.json"), "w") as system_json_file: json.dump(system_config, system_json_file, ensure_ascii=False)