From 9d8750c75e15eb9b4a769ef5711fae624a7c8121 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Mon, 6 Jan 2025 16:58:32 +0100 Subject: [PATCH] minifai: run instsoft hook --- usr/lib/grml-live/minifai | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/usr/lib/grml-live/minifai b/usr/lib/grml-live/minifai index d05678c9..2f46d00b 100755 --- a/usr/lib/grml-live/minifai +++ b/usr/lib/grml-live/minifai @@ -193,9 +193,6 @@ def run_class_scripts(conf_dir: Path, chroot_dir: Path, class_name: str, helper_ def install_packages_for_classes(conf_dir: Path, chroot_dir: Path, classes: list[str], dynamic_state: DynamicState): """Run equivalent of "instsoft" task: set debconf selections and install packages listed in package lists.""" - if should_skip_task(dynamic_state, "instsoft"): - return - # debconf is not Essential. Ensure it is installed, so we can use debconf-set-selections. chrooted_apt_satisfy(chroot_dir, "debconf") for class_name in classes: @@ -562,7 +559,12 @@ def _run_tasks(conf_dir: Path, chroot_dir: Path, classes: list[str], hostname: s with policy_rcd(chroot_dir): task_updatebase(chroot_dir, dynamic_state) - install_packages_for_classes(conf_dir, chroot_dir, classes, dynamic_state) + + if not should_skip_task(dynamic_state, "instsoft"): + for class_name in classes: + run_fai_script(chroot_dir, conf_dir / "hooks" / f"instsoft.{class_name}", helper_tools_path, hook_env) + + install_packages_for_classes(conf_dir, chroot_dir, classes, dynamic_state) if not should_skip_task(dynamic_state, "configure"): for class_name in classes: