diff options
| author | tranch <tranch.xiao@gmail.com> | 2026-07-25 09:57:45 +0800 |
|---|---|---|
| committer | tranch <tranch.xiao@gmail.com> | 2026-07-25 09:57:45 +0800 |
| commit | db108b8b23c86ba39a2ba289fc6129a6325f045f (patch) | |
| tree | e9b7970feeb25082f018d8236992c67c965564b0 /installer/build.sh | |
| parent | 50ff7ec0acaea2b426aa026772ae6c1eb944df23 (diff) | |
| download | AeroCore-OS-db108b8b23c86ba39a2ba289fc6129a6325f045f.tar.gz AeroCore-OS-db108b8b23c86ba39a2ba289fc6129a6325f045f.zip | |
Normalize installer payload and host naming
Use a formal local installer image tag and set aerocore-os as the
default hostname in both the live image and installed target system.
Diffstat (limited to 'installer/build.sh')
| -rwxr-xr-x | installer/build.sh | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/installer/build.sh b/installer/build.sh index aa30f42..c119dcc 100755 --- a/installer/build.sh +++ b/installer/build.sh @@ -111,6 +111,22 @@ df -h /var/tmp \${target_tmp} %end ostreecontainer --url=${INSTALL_IMAGE_PAYLOAD} --transport=containers-storage --no-signature-verification + +%post --nochroot --log=/tmp/aerocore-hostname.log +set -eux +target_root= +for root in /mnt/sysroot /mnt/sysimage /var/mnt/sysimage; do + if mountpoint -q \${root}; then + target_root=\${root} + break + fi +done +if [ x\${target_root} = x ]; then + echo No mounted target system found for hostname setup >&2 + exit 1 +fi +systemd-firstboot --root=\${target_root} --hostname=aerocore-os +%end EOF mkdir -p /usr/lib/bootc-image-builder @@ -146,5 +162,5 @@ mkdir -p /boot/efi/EFI/BOOT cp -v "${grubx64}" /boot/efi/EFI/BOOT/BOOTX64.EFI cp -v "${grubx64}" /boot/efi/EFI/BOOT/fbx64.efi -systemd-firstboot --timezone UTC +systemd-firstboot --hostname aerocore-os --timezone UTC dnf clean all |
