Blame SOURCES/rhbz1650594.patch

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