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