summaryrefslogtreecommitdiff
path: root/src/kernel-install
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-02-09 10:53:16 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2023-02-09 14:46:17 +0000
commit77db9ef2ab4acf88d093086031f529c7d5c3e407 (patch)
treed10081057de936ed9ee669201deff64c09125fcb /src/kernel-install
parentdbfd5d38377c523a44d0fb66a8516ae1e5998afe (diff)
downloadsystemd-77db9ef2ab4acf88d093086031f529c7d5c3e407.tar.gz
boot: Make sure we take --root into account everywhere.
Diffstat (limited to 'src/kernel-install')
-rwxr-xr-xsrc/kernel-install/test-kernel-install.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/kernel-install/test-kernel-install.sh b/src/kernel-install/test-kernel-install.sh
index f16bb9f50f..bc833e4cb2 100755
--- a/src/kernel-install/test-kernel-install.sh
+++ b/src/kernel-install/test-kernel-install.sh
@@ -90,18 +90,21 @@ if test -x "$_KERNEL_INSTALL_BOOTCTL"; then
echo "Testing bootctl"
e2="${entry%+*}_2.conf"
cp "$entry" "$e2"
- export SYSTEMD_ESP_PATH=/
+ export SYSTEMD_ESP_PATH=/boot
+ # We use --root so strip the root prefix from KERNEL_INSTALL_CONF_ROOT
+ export KERNEL_INSTALL_CONF_ROOT="sources"
# create file that is not referenced. Check if cleanup removes
# it but leaves the rest alone
:> "$BOOT_ROOT/the-token/1.1.2/initrd"
- "$_KERNEL_INSTALL_BOOTCTL" --root="$BOOT_ROOT" cleanup
+ "$_KERNEL_INSTALL_BOOTCTL" --root="$D" cleanup
test ! -e "$BOOT_ROOT/the-token/1.1.2/initrd"
test -e "$BOOT_ROOT/the-token/1.1.2/linux"
test -e "$BOOT_ROOT/the-token/1.1.1/linux"
test -e "$BOOT_ROOT/the-token/1.1.1/initrd"
+
# now remove duplicated entry and make sure files are left over
- "$_KERNEL_INSTALL_BOOTCTL" --root="$BOOT_ROOT" unlink "${e2##*/}"
+ "$_KERNEL_INSTALL_BOOTCTL" --root="$D" unlink "${e2##*/}"
test -e "$BOOT_ROOT/the-token/1.1.1/linux"
test -e "$BOOT_ROOT/the-token/1.1.1/initrd"
test -e "$entry"
@@ -109,7 +112,7 @@ if test -x "$_KERNEL_INSTALL_BOOTCTL"; then
# remove last entry referencing those files
entry_id="${entry##*/}"
entry_id="${entry_id%+*}.conf"
- "$_KERNEL_INSTALL_BOOTCTL" --root="$BOOT_ROOT" unlink "$entry_id"
+ "$_KERNEL_INSTALL_BOOTCTL" --root="$D" unlink "$entry_id"
test ! -e "$entry"
test ! -e "$BOOT_ROOT/the-token/1.1.1/linux"
test ! -e "$BOOT_ROOT/the-token/1.1.1/initrd"