Bug 308151
| Summary: | kernel gets a mysterious error message on removal | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Michal Jaegermann <michal> |
| Component: | kexec-tools | Assignee: | Neil Horman <nhorman> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | rawhide | CC: | pjones |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2007-10-03 17:37:32 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Michal Jaegermann
2007-09-26 22:25:11 UTC
something broke in new-kernel-pkg maybe? Peter ? I found what is broken. While removing some kernel with 'rpm -evv ...':
....
D: erase: %postun(kexec-tools-1.102pre-1.fc8.x86_64) asynchronous scriptlet
start
D: erase: %trigger(kexec-tools-1.102pre-1.fc8.x86_64) execv(/bin/sh)
pid 10916
++ ls '/boot/initrd*kdump.img'
ls: cannot access /boot/initrd*kdump.img: No such file or directory
.....
and 'rpm -q --triggers kexec-tools' shows
#start by getting a list of all the kdump initrds
for i in `ls /boot/initrd*kdump.img`
do
KDVER=`echo $i | sed -e's/^.*initrd-//' -e's/kdump.*$//'`
....
done
That is clearly wrong. That loop should read
for i in /boot/initrd*kdump.img ; do
[ -e "$i" ] || continue
KDVER=`echo $i | sed -e's/^.*initrd-//' -e's/kdump.*$//'`
....
done
unless you want to use 'shopt -s nullglob' and make an existence
test redundant.
Setting KDVER also does not require external programs.
KDVER="${i##*initrd-}" ; KDVER="${KDVER%%kdump*}"
The abvove with kexec-tools-1.102pre-1.fc8.
Yep you're right. Thanks for the catch. Commited to the fedora devel branch. Thanks! |