|
|
2a7ee1 |
From c49c37d5e26bf71a97d5194d390f80d3e71758e1 Mon Sep 17 00:00:00 2001
|
|
|
2a7ee1 |
From: systemd team <systemd-maint@redhat.com>
|
|
|
2a7ee1 |
Date: Tue, 23 Apr 2019 10:46:19 -0300
|
|
|
2a7ee1 |
Subject: [PATCH] Update kernel-install script by backporting fedora patches
|
|
|
2a7ee1 |
|
|
|
2a7ee1 |
---
|
|
|
2a7ee1 |
src/kernel-install/kernel-install | 30 +++++++++++++++++-------------
|
|
|
2a7ee1 |
1 file changed, 17 insertions(+), 13 deletions(-)
|
|
|
2a7ee1 |
|
|
|
2a7ee1 |
diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install
|
|
|
2a7ee1 |
index f1c74de..d860701 100755
|
|
|
2a7ee1 |
--- a/src/kernel-install/kernel-install
|
|
|
2a7ee1 |
+++ b/src/kernel-install/kernel-install
|
|
|
2a7ee1 |
@@ -73,23 +73,27 @@ KERNEL_IMAGE="$2"
|
|
|
2a7ee1 |
|
|
|
2a7ee1 |
if [[ -x /sbin/new-kernel-pkg ]]; then
|
|
|
2a7ee1 |
KERNEL_DIR="${KERNEL_IMAGE%/*}"
|
|
|
2a7ee1 |
- if [[ "${KERNEL_DIR}" != "/boot" ]]; then
|
|
|
2a7ee1 |
- for i in \
|
|
|
2a7ee1 |
- "$KERNEL_IMAGE" \
|
|
|
2a7ee1 |
- "$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac" \
|
|
|
2a7ee1 |
- "$KERNEL_DIR"/System.map \
|
|
|
2a7ee1 |
- "$KERNEL_DIR"/config \
|
|
|
2a7ee1 |
- "$KERNEL_DIR"/zImage.stub \
|
|
|
2a7ee1 |
- "$KERNEL_DIR"/dtb \
|
|
|
2a7ee1 |
- ; do
|
|
|
2a7ee1 |
- [[ -e "$i" ]] || continue
|
|
|
2a7ee1 |
- cp -a "$i" "/boot/${i##*/}-${KERNEL_VERSION}"
|
|
|
2a7ee1 |
- done
|
|
|
2a7ee1 |
- fi
|
|
|
2a7ee1 |
|
|
|
2a7ee1 |
[[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}"
|
|
|
2a7ee1 |
case "$COMMAND" in
|
|
|
2a7ee1 |
add)
|
|
|
2a7ee1 |
+ if [[ "${KERNEL_DIR}" != "/boot" ]]; then
|
|
|
2a7ee1 |
+ for i in \
|
|
|
2a7ee1 |
+ "$KERNEL_IMAGE" \
|
|
|
2a7ee1 |
+ "$KERNEL_DIR"/System.map \
|
|
|
2a7ee1 |
+ "$KERNEL_DIR"/config \
|
|
|
2a7ee1 |
+ "$KERNEL_DIR"/zImage.stub \
|
|
|
2a7ee1 |
+ "$KERNEL_DIR"/dtb \
|
|
|
2a7ee1 |
+ ; do
|
|
|
2a7ee1 |
+ [[ -e "$i" ]] || continue
|
|
|
2a7ee1 |
+ cp -aT "$i" "/boot/${i##*/}-${KERNEL_VERSION}"
|
|
|
2a7ee1 |
+ done
|
|
|
2a7ee1 |
+ # hmac is .vmlinuz-<version>.hmac so needs a special treatment
|
|
|
2a7ee1 |
+ i="$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac"
|
|
|
2a7ee1 |
+ if [[ -e "$i" ]]; then
|
|
|
2a7ee1 |
+ cp -aT "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac"
|
|
|
2a7ee1 |
+ fi
|
|
|
2a7ee1 |
+ fi
|
|
|
2a7ee1 |
/sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $?
|
|
|
2a7ee1 |
/sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" || exit $?
|
|
|
2a7ee1 |
/sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $?
|
|
|
2a7ee1 |
--
|
|
|
2a7ee1 |
1.8.3.1
|
|
|
2a7ee1 |
|