Blame SOURCES/rhbz1650594.patch

ac42f3
commit 734f5acf6c568c02254a33730c6f0fff016bdd09
ac42f3
Author: Martin Cermak <mcermak@redhat.com>
ac42f3
Date:   Wed Jan 20 22:09:49 2021 +0100
ac42f3
ac42f3
    systemtap-service onboot: Skip updating the bootloader
ac42f3
    
ac42f3
    It shows up that just modifying the default initrd is good enough,
ac42f3
    no need to call kernel-install or new-kernel-pkg.  This speeds up
ac42f3
    the systemtap-service onboot operation.
ac42f3
ac42f3
diff --git a/initscript/systemtap.in b/initscript/systemtap.in
ac42f3
index 713f7a680..b1621ae2f 100755
ac42f3
--- a/initscript/systemtap.in
ac42f3
+++ b/initscript/systemtap.in
ac42f3
@@ -46,8 +46,6 @@ STAPRUN=@bindir@/staprun
ac42f3
 UNAME=/bin/uname
ac42f3
 LSMOD=/sbin/lsmod
ac42f3
 DRACUT=`which dracut`
ac42f3
-NEWKERNELPKG=/sbin/new-kernel-pkg
ac42f3
-KERNELINSTALL=/usr/bin/kernel-install
ac42f3
 
ac42f3
 # Not actually used directly, but needed by
ac42f3
 # stap dracut module for inclusion in initramfs
ac42f3
@@ -839,10 +837,6 @@ backup_initramfs() {
ac42f3
 
ac42f3
 onboot () {
ac42f3
   local s ret ss
ac42f3
-  if [ ! -f "$NEWKERNELPKG" -a ! -f "$KERNELINSTALL" ]; then
ac42f3
-    do_failure "Could not find $NEWKERNELPKG nor $KERNELINSTALL"
ac42f3
-    return 1
ac42f3
-  fi
ac42f3
   if [ ! -f "$DRACUT" ]; then
ac42f3
     do_failure "$DRACUT not found"
ac42f3
     return 1
ac42f3
@@ -940,20 +934,6 @@ onboot () {
ac42f3
     return 0
ac42f3
   fi
ac42f3
   clog "done"
ac42f3
-  # We're installing the initramfs in the default location, so user
ac42f3
-  # expects the next boot to use it. Let's also update the bootloader.
ac42f3
-  clog " Updating bootloader ... " -n
ac42f3
-  if [ -x "$NEWKERNELPKG" ]; then
ac42f3
-      logex $NEWKERNELPKG --initrdfile="$INITRAMFS" \
ac42f3
-            --update $KRELEASE
ac42f3
-  else
ac42f3
-      logex $KERNELINSTALL add $KRELEASE /boot/vmlinuz-$KRELEASE
ac42f3
-  fi
ac42f3
-  if [ $? -ne 0 ]; then
ac42f3
-    do_failure "bootloader update exited with nonzero status"
ac42f3
-    return 1
ac42f3
-  fi
ac42f3
-  might_success "initramfs created and bootloader updated"
ac42f3
   return 0
ac42f3
 }
ac42f3