Files
Vetting/live-image/mkosi.postinst
T
josh a893b0d817
CI / Lint + build + test (push) Successful in 1m33s
Release / release (push) Failing after 1m43s
live-image: stage agent binary via mkosi.extra
mkosi only mounts live-image/ as /work/src, so the postinst couldn't
reach the repo-root bin/vetting-agent.linux-amd64 — the build failed
in CI with `install: cannot stat '/work/src/bin/vetting-agent.linux-amd64'`.

The Makefile now copies the prebuilt agent into mkosi.extra/, which
mkosi merges into the image root automatically. The postinst is
reduced to creating the multi-user.target.wants symlink.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 03:13:38 -04:00

11 lines
492 B
Bash
Executable File

#!/bin/sh
# mkosi postinst: enable the vetting-agent service. The binary lands in
# the image via mkosi.extra/ (staged by the live-image Makefile from
# ../bin/vetting-agent.linux-amd64); the service unit lands via
# mkosi.skeleton/. All we need here is the multi-user.target symlink.
set -eu
mkdir -p "$BUILDROOT/etc/systemd/system/multi-user.target.wants"
ln -sf /etc/systemd/system/vetting-agent.service \
"$BUILDROOT/etc/systemd/system/multi-user.target.wants/vetting-agent.service"