mirror of
https://github.com/blazblue547-afk/aero3.git
synced 2026-12-02 14:24:17 -05:00
32 lines
1.3 KiB
Bash
32 lines
1.3 KiB
Bash
#!/usr/bin/env bash
|
|||
|
|
# scripts/05-systemd-boot.sh — build systemd/dbus/shadow/grub + configure system.
|
||
|
|
source "$(dirname "${BASH_SOURCE[0]}")/lib/common.sh"
|
||
|
|
require_root
|
||
|
|
LFS="$AEROS_ROOT"
|
||
|
|
|
||
|
|
trap 'mountpoint -q "$LFS/sources" && umount -l "$LFS/sources"; umount_vkfs 2>/dev/null || true' EXIT
|
||
|
|
|
||
|
|
step "systemd / D-Bus / shadow / GRUB"
|
||
|
|
mount_vkfs
|
||
|
|
mkdir -p "$LFS/sources"
|
||
|
|
mountpoint -q "$LFS/sources" || mount --bind "$AEROS_SOURCES" "$LFS/sources"
|
||
|
|
|
||
|
|
install -m755 "$AEROS_TOP/packages/chroot-buildtools.sh" "$LFS/root/build-tools.sh"
|
||
|
|
install -m755 "$AEROS_TOP/packages/chroot-systemd.sh" "$LFS/root/build-systemd.sh"
|
||
|
|
|
||
|
|
[[ -f "$LFS/usr/include/crypt.h" && -e "$LFS/usr/lib/libcrypt.so" ]] || \
|
||
|
|
die "stage 05 requires libxcrypt inside the chroot; run: sudo ./build.sh stage 03"
|
||
|
|
|
||
|
|
# pass branding/config env into the chroot build
|
||
|
|
ENVS="AEROS_NAME='$AEROS_NAME' AEROS_VERSION='$AEROS_VERSION' \
|
||
|
|
AEROS_CODENAME='$AEROS_CODENAME' AEROS_DISTRO_ID='$AEROS_DISTRO_ID' \
|
||
|
|
AEROS_HOSTNAME='$AEROS_HOSTNAME' AEROS_LOCALE='$AEROS_LOCALE' \
|
||
|
|
AEROS_TIMEZONE='$AEROS_TIMEZONE' AEROS_KEYMAP='$AEROS_KEYMAP' \
|
||
|
|
AEROS_ROOT_PASS='$AEROS_ROOT_PASS' MAKEFLAGS='-j${AEROS_JOBS}'"
|
||
|
|
|
||
|
|
in_chroot "$ENVS /root/build-tools.sh"
|
||
|
|
in_chroot "$ENVS /root/build-systemd.sh"
|
||
|
|
|
||
|
|
mountpoint -q "$LFS/sources" && umount -l "$LFS/sources" || true
|
||
|
|
umount_vkfs
|
||
|
|
ok "init + boot layer complete"
|