Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Sign the default/fallback loader #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions sicherboot
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,11 @@ BOOTCTL_HELP="Usage: sicherboot bootctl [<argument> ...]
systemd-boot${EFI_ARCH}.efi
"
bootctl() {
command bootctl --path="$BOOT_EFI_DIR" "$@"
sign_image "$BOOT_EFI_DIR/EFI/systemd/systemd-boot${EFI_ARCH}.efi"
PATHS=`command bootctl --path="$BOOT_EFI_DIR" "$@" 2>&1 | grep $BOOT_EFI_DIR | cut -d'"' -f 4`
for item in $PATHS
do
sign_image "$item"
done
}


Expand Down
1 change: 1 addition & 0 deletions tests/test-setup
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ testsuccess test -e tmp/efi/loader/entries/machine-id-keytool.conf
cat >> $PWD/tmp/bootctl << EOF
#!/bin/sh
install -D /usr/lib/systemd/boot/efi/systemd-boot${EFI_ARCH}.efi $PWD/tmp/efi/EFI/systemd/systemd-boot${EFI_ARCH}.efi
echo "Copied \"/usr/lib/systemd/boot/efi/systemd-boot${EFI_ARCH}.efi\" to \"$PWD/tmp/efi/EFI/systemd/systemd-bootx64.efi\"."
EOF

chmod +x $PWD/tmp/bootctl
Expand Down