Skip to content

Commit

Permalink
minifai: run instsoft hook
Browse files Browse the repository at this point in the history
  • Loading branch information
zeha committed Jan 6, 2025
1 parent 29ba27a commit 9d8750c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions usr/lib/grml-live/minifai
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 9d8750c

Please sign in to comment.