Skip to content
Snippets Groups Projects
Commit 31283fcf authored by Denis Pynkin's avatar Denis Pynkin
Browse files

Refresh patch for UEFI entries generator


Update names for entry directories variables and fix options count.

Signed-off-by: default avatarDenis Pynkin <denis.pynkin@collabora.com>
parent d317c1fc
No related branches found
No related tags found
No related merge requests found
From 48877ecd94ff71c03e3d880601fb0ba067f11a35 Mon Sep 17 00:00:00 2001
From: Denis Pynkin <denis.pynkin@collabora.com>
Date: Thu, 14 Feb 2019 00:04:13 +0300
Date: Mon, 3 May 2021 02:28:43 +0300
Subject: Remove bashisms from the UEFI entries generator
- Use [ not [[ and -z to test for non-emptiness
......@@ -8,11 +9,11 @@ Subject: Remove bashisms from the UEFI entries generator
Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
Signed-off-by: Frederic Dalleau <frederic.dalleau@collabora.com>
---
src/kernel-install/90-loaderentry.install | 77 +++++++++++++++++--------------
1 file changed, 43 insertions(+), 34 deletions(-)
src/kernel-install/90-loaderentry.install | 75 +++++++++++++----------
1 file changed, 42 insertions(+), 33 deletions(-)
diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install
index d096745..9e1b910 100644
index d096745..12d7b6e 100644
--- a/src/kernel-install/90-loaderentry.install
+++ b/src/kernel-install/90-loaderentry.install
@@ -1,4 +1,4 @@
......@@ -21,12 +22,9 @@ index d096745..9e1b910 100644
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
@@ -6,13 +6,13 @@ COMMAND="$1"
KERNEL_VERSION="$2"
ENTRY_DIR_ABS="$3"
@@ -8,11 +8,11 @@ ENTRY_DIR_ABS="$3"
KERNEL_IMAGE="$4"
-INITRD_OPTIONS_START="5"
+INITRD_OPTIONS_START="4"
INITRD_OPTIONS_START="5"
-if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then
+if [ -z "$KERNEL_INSTALL_MACHINE_ID" ]; then
......@@ -112,7 +110,7 @@ index d096745..9e1b910 100644
}
-INITRD_OPTIONS=( "${@:${INITRD_OPTIONS_START}}" )
+shift $INITRD_OPTIONS_SHIFT
+shift $INITRD_OPTIONS_START
+INITRD_OPTIONS=""
+while [ $# -gt 0 ] ; do
+ if [ -z "$INITRD_OPTIONS" ] ; then
......@@ -153,8 +151,11 @@ index d096745..9e1b910 100644
- echo "initrd $ENTRY_DIR/$(basename ${initrd})"
+ echo "${INITRD_OPTIONS}" | while read initrd; do
+ initrd_basename=$(basename "${initrd}")
+ [ -f "$BOOT_DIR_ABS/${initrd_basename}" ] && \
+ echo "initrd $BOOT_DIR/${initrd_basename}"
+ [ -f "$ENTRY_DIR_ABS/${initrd_basename}" ] && \
+ echo "initrd $ENTRY_DIR/${initrd_basename}"
done
:
} > "$LOADER_ENTRY" || {
--
2.29.3
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment