Blame SOURCES/rhbz1650594.patch

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