]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
90-loaderentry: make sure that variables are set
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 13 Apr 2023 15:50:07 +0000 (17:50 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 3 May 2023 10:29:40 +0000 (12:29 +0200)
We unconditionally use the variables later on, so let's make sure
that they were passed as expected.

src/kernel-install/90-loaderentry.install.in

index e8e8cf37c36e34c0d70b631bf57fcbe7c5b5c4ae..f4ba4708baccf7e14c27f1cd5b68a3b3211e8972 100755 (executable)
@@ -28,9 +28,9 @@ INITRD_OPTIONS_SHIFT=4
 
 [ "$KERNEL_INSTALL_LAYOUT" = "bls" ] || exit 0
 
-MACHINE_ID="$KERNEL_INSTALL_MACHINE_ID"
-ENTRY_TOKEN="$KERNEL_INSTALL_ENTRY_TOKEN"
-BOOT_ROOT="$KERNEL_INSTALL_BOOT_ROOT"
+MACHINE_ID="${KERNEL_INSTALL_MACHINE_ID:?}"
+ENTRY_TOKEN="${KERNEL_INSTALL_ENTRY_TOKEN:?}"
+BOOT_ROOT="${KERNEL_INSTALL_BOOT_ROOT:?}"
 
 [ -n "$BOOT_MNT" ] || BOOT_MNT="$(stat -c %m "$BOOT_ROOT")"
 if [ "$BOOT_MNT" = '/' ]; then