Resolves: bz 710744

This commit is contained in:
Neil Horman 2011-06-06 15:43:54 -04:00
parent 4baddcfbfa
commit fe18fead61
2 changed files with 7 additions and 3 deletions

View File

@ -1,6 +1,6 @@
Name: kexec-tools Name: kexec-tools
Version: 2.0.0 Version: 2.0.0
Release: 46%{?dist} Release: 47%{?dist}
License: GPLv2 License: GPLv2
Group: Applications/System Group: Applications/System
Summary: The kexec/kdump userspace component. Summary: The kexec/kdump userspace component.
@ -282,6 +282,9 @@ done
%changelog %changelog
* Mon Jun 02 2011 Neil Horman <nhorman@redhat.com> - 2.0.0-47
- Fixed misuse of readlink command after directory change (bz 710744)
* Tue Apr 26 2011 Neil Horman <nhorman@redhat.com> - 2.0.0-46 * Tue Apr 26 2011 Neil Horman <nhorman@redhat.com> - 2.0.0-46
- Fix some grammer in man page (bz 673817) - Fix some grammer in man page (bz 673817)

View File

@ -364,7 +364,8 @@ findstoragedriverinsys () {
[ "$PWD" = "/sys" ] && return [ "$PWD" = "/sys" ] && return
cd .. cd ..
done done
cd $(readlink ./device) devname=$(readlink ./device)
cd $devname
while [ ! -f modalias ]; do while [ ! -f modalias ]; do
[ "$PWD" = "/sys/devices" ] && return [ "$PWD" = "/sys/devices" ] && return
cd .. cd ..
@ -372,7 +373,7 @@ findstoragedriverinsys () {
[ -e modalias ] && modalias=$(cat modalias) [ -e modalias ] && modalias=$(cat modalias)
[ -e device ] && modalias=$(cat $(find /sys/devices -name modalias [ -e device ] && modalias=$(cat $(find /sys/devices -name modalias
| grep $(basename $(readlink ./device)))) | grep $(basename $devname)))
for driver in $(modprobe --set-version $kernel --show-depends $modalias 2>/dev/null| awk '{ print gensub(".*/","","g",$2) }') ; do for driver in $(modprobe --set-version $kernel --show-depends $modalias 2>/dev/null| awk '{ print gensub(".*/","","g",$2) }') ; do
findmodule ${driver%%.ko} findmodule ${driver%%.ko}