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

Fix kernel-install call from update-initramfs


Fix parameters assignment in `kernel-install` while calling
from `update-initramfs` or any package update except kernel.

Signed-off-by: default avatarDenis Pynkin <denis.pynkin@collabora.com>
parent 0b7b2a3a
No related branches found
No related tags found
No related merge requests found
From a579f2088bd9521300d46cc5835757fe0d503f21 Mon Sep 17 00:00:00 2001 From 2b3c1bccc61217f9800fa6b6f7af1007dd6c27e3 Mon Sep 17 00:00:00 2001
From: Denis Pynkin <denis.pynkin@collabora.com> From: Denis Pynkin <denis.pynkin@collabora.com>
Date: Thu, 14 Feb 2019 00:46:48 +0300 Date: Mon, 3 May 2021 03:12:29 +0300
Subject: Reworked kernel-install script Subject: Reworked kernel-install script
- Removed bashisms -- script is adapted for running with `/bin/sh` - Removed bashisms -- script is adapted for running with `/bin/sh`
...@@ -18,7 +18,7 @@ Signed-off-by: Frederic Dalleau <frederic.dalleau@collabora.com> ...@@ -18,7 +18,7 @@ Signed-off-by: Frederic Dalleau <frederic.dalleau@collabora.com>
1 file changed, 56 insertions(+), 44 deletions(-) 1 file changed, 56 insertions(+), 44 deletions(-)
diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install
index e7457e9..962df08 100755 index e7457e9..6729168 100755
--- a/src/kernel-install/kernel-install --- a/src/kernel-install/kernel-install
+++ b/src/kernel-install/kernel-install +++ b/src/kernel-install/kernel-install
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
...@@ -92,10 +92,10 @@ index e7457e9..962df08 100755 ...@@ -92,10 +92,10 @@ index e7457e9..962df08 100755
+ KERNEL_IMAGE="$2" + KERNEL_IMAGE="$2"
else else
COMMAND="$1" COMMAND="$1"
+ KERNEL_VERSION="$1"
+ KERNEL_IMAGE="$2"
shift shift
- INITRD_OPTIONS=( "${@:3}" ) - INITRD_OPTIONS=( "${@:3}" )
+ KERNEL_VERSION="$1"
+ KERNEL_IMAGE="$2"
+ while [ $# -gt 2 ] ; do + while [ $# -gt 2 ] ; do
+ if [ -z "$INITRD_OPTIONS" ] ; then + if [ -z "$INITRD_OPTIONS" ] ; then
+ INITRD_OPTIONS="$3" + INITRD_OPTIONS="$3"
...@@ -222,5 +222,5 @@ index e7457e9..962df08 100755 ...@@ -222,5 +222,5 @@ index e7457e9..962df08 100755
exit $ret exit $ret
+ +
-- --
2.20.1 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