aboutsummaryrefslogtreecommitdiffstats
path: root/roles/space_server/files/kernel
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2018-09-22 15:29:45 +0200
committerEmil Renner Berthing <esmil@labitat.dk>2018-11-10 22:31:14 +0100
commit311893c3bc2bbd18669b5c80bf884e9d25889b74 (patch)
tree19b9b3664a9d29fcd30cf82ccf82037be5c9f726 /roles/space_server/files/kernel
parent9454fdbff511e965e4fd9eb187b7fe432dcd437e (diff)
downloadlabitat-ansible-311893c3bc2bbd18669b5c80bf884e9d25889b74.tar.gz
labitat-ansible-311893c3bc2bbd18669b5c80bf884e9d25889b74.tar.xz
labitat-ansible-311893c3bc2bbd18669b5c80bf884e9d25889b74.zip
space_server: update for Fedora 29
Diffstat (limited to 'roles/space_server/files/kernel')
-rwxr-xr-xroles/space_server/files/kernel/90-loaderentry.install10
-rwxr-xr-xroles/space_server/files/kernel/95-syslinux-menu.install10
2 files changed, 12 insertions, 8 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"
diff --git a/roles/space_server/files/kernel/95-syslinux-menu.install b/roles/space_server/files/kernel/95-syslinux-menu.install
index 183da9e..2dd2772 100755
--- a/roles/space_server/files/kernel/95-syslinux-menu.install
+++ b/roles/space_server/files/kernel/95-syslinux-menu.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}
MENU="$BOOT_ROOT/loader/${MACHINE_ID}.cfg"