mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
mkosi: Install sd-boot using postinst script instead of in build script
This allows us to reuse bootctl install instead of replicating the logic in the build script.
This commit is contained in:
parent
49ae9d91f9
commit
1b6f9b9880
@ -110,12 +110,3 @@ if [ -n "$IMAGE_VERSION" ] ; then
|
|||||||
cat /tmp/os-release.tmp > "$DESTDIR"/usr/lib/os-release
|
cat /tmp/os-release.tmp > "$DESTDIR"/usr/lib/os-release
|
||||||
rm /tmp/os-release.tmp
|
rm /tmp/os-release.tmp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Manually update the boot loader from the one we just built
|
|
||||||
mkdir -p "$DESTDIR"/boot/efi/EFI/systemd "$DESTDIR"/boot/efi/EFI/BOOT
|
|
||||||
cp "$DESTDIR"/usr/lib/systemd/boot/efi/systemd-bootx64.efi "$DESTDIR"/boot/efi/EFI/systemd/systemd-bootx64.efi
|
|
||||||
cp "$DESTDIR"/usr/lib/systemd/boot/efi/systemd-bootx64.efi "$DESTDIR"/boot/efi/EFI/BOOT/bootx64.efi
|
|
||||||
|
|
||||||
mkdir -p "$DESTDIR"/efi/EFI/systemd "$DESTDIR"/efi/EFI/BOOT
|
|
||||||
cp "$DESTDIR"/usr/lib/systemd/boot/efi/systemd-bootx64.efi "$DESTDIR"/efi/EFI/systemd/systemd-bootx64.efi
|
|
||||||
cp "$DESTDIR"/usr/lib/systemd/boot/efi/systemd-bootx64.efi "$DESTDIR"/efi/EFI/BOOT/bootx64.efi
|
|
||||||
|
6
mkosi.postinst
Executable file
6
mkosi.postinst
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
|
if [ "$1" = "final" ] && command -v bootctl > /dev/null; then
|
||||||
|
bootctl install
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user