Blame SOURCES/rhbz1650594.patch

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