From bd236f87732d2b4f21a2c7dbba1e0d079a9535c0 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Aug 15 2014 13:44:04 +0000 Subject: udpate kernel-install-grubby.patch Copy over the kernel and other files, if the kernel is not in /boot. --- diff --git a/kernel-install-grubby.patch b/kernel-install-grubby.patch index 481859d..fa53b96 100644 --- a/kernel-install-grubby.patch +++ b/kernel-install-grubby.patch @@ -1,31 +1,49 @@ -From 0fe97bc02e3108efdb844feb1b367a89ba995d83 Mon Sep 17 00:00:00 2001 +From 0256bbe384f243dbbcfbe87200c9d8613a992ecb Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 14 Jan 2014 17:48:08 -0500 Subject: [PATCH] kernel-install: add fedora specific callouts to new-kernel-pkg --- - src/kernel-install/kernel-install | 21 +++++++++++++++++++++ - 1 file changed, 21 insertions(+) + src/kernel-install/kernel-install | 36 ++++++++++++++++++++++++++++++++++++ + 1 file changed, 36 insertions(+) + mode change 100644 => 100755 src/kernel-install/kernel-install diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install -index 3ae1d77..3a2ac56 100644 +old mode 100644 +new mode 100755 +index 3ae1d77..f1c74de --- a/src/kernel-install/kernel-install +++ b/src/kernel-install/kernel-install -@@ -19,6 +19,27 @@ - # You should have received a copy of the GNU Lesser General Public License - # along with systemd; If not, see . +@@ -71,6 +71,42 @@ fi + KERNEL_VERSION="$1" + KERNEL_IMAGE="$2" +if [[ -x /sbin/new-kernel-pkg ]]; then -+ [[ "$2" == *\+* ]] && flavor=-"${2##*+}" -+ case "$1" in ++ KERNEL_DIR="${KERNEL_IMAGE%/*}" ++ if [[ "${KERNEL_DIR}" != "/boot" ]]; then ++ for i in \ ++ "$KERNEL_IMAGE" \ ++ "$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac" \ ++ "$KERNEL_DIR"/System.map \ ++ "$KERNEL_DIR"/config \ ++ "$KERNEL_DIR"/zImage.stub \ ++ "$KERNEL_DIR"/dtb \ ++ ; do ++ [[ -e "$i" ]] || continue ++ cp -a "$i" "/boot/${i##*/}-${KERNEL_VERSION}" ++ done ++ fi ++ ++ [[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}" ++ case "$COMMAND" in + add) -+ /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$2" || exit $? -+ /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$2" || exit $? -+ /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$2" || exit $? ++ /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $? ++ /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" || exit $? ++ /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $? + ;; + remove) -+ /sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$2" || exit $? ++ /sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$KERNEL_VERSION" || exit $? + ;; + *) + ;; @@ -37,6 +55,9 @@ index 3ae1d77..3a2ac56 100644 + fi +fi + - usage() - { - echo "Usage:" + if [[ -f /etc/machine-id ]]; then + read MACHINE_ID < /etc/machine-id + fi +-- +2.0.4 +