aboutsummaryrefslogtreecommitdiffstats
path: root/roles/space_server/files/kernel/90-loaderentry.install
diff options
context:
space:
mode:
Diffstat (limited to 'roles/space_server/files/kernel/90-loaderentry.install')
-rwxr-xr-xroles/space_server/files/kernel/90-loaderentry.install10
1 files changed, 6 insertions, 4 deletions
diff --git a/roles/space_server/files/kernel/90-loaderentry.install b/roles/space_server/files/kernel/90-loaderentry.install
index df0526e..40d325a 100755
--- a/roles/space_server/files/kernel/90-loaderentry.install
+++ b/roles/space_server/files/kernel/90-loaderentry.install
@@ -7,14 +7,16 @@ KERNEL_VERSION="$2"
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
-if [[ -f /etc/machine-id ]]; then
- read MACHINE_ID < /etc/machine-id
+if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then
+ exit 0
fi
-if ! [[ $MACHINE_ID ]]; then
- exit 1
+if ! [[ -d "$BOOT_DIR_ABS" ]]; then
+ exit 0
fi
+MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
+
BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION"
BOOT_ROOT=${BOOT_DIR_ABS%$BOOT_DIR}
LOADER_ENTRY="$BOOT_ROOT/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"