systemtap/SOURCES/rhbz1650594.patch

56 lines
1.7 KiB
Diff

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