Fix misuse of basename in mkdumprd
Resolves bz: 683769
This commit is contained in:
parent
0961b1bce8
commit
678b7b882f
@ -1,6 +1,6 @@
|
|||||||
Name: kexec-tools
|
Name: kexec-tools
|
||||||
Version: 2.0.0
|
Version: 2.0.0
|
||||||
Release: 44%{?dist}
|
Release: 45%{?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 Mar 28 2011 Neil Horman <nhorman@redhat.com> - 2.0.0-45
|
||||||
|
- Fix misuse of basename in mkdumprd (bz 683769)
|
||||||
|
|
||||||
* Thu Mar 10 2011 Neil Horman <nhorman@redhat.com> - 2.0.0-44
|
* Thu Mar 10 2011 Neil Horman <nhorman@redhat.com> - 2.0.0-44
|
||||||
- Fix build break in purgatory makefile
|
- Fix build break in purgatory makefile
|
||||||
|
|
||||||
|
16
mkdumprd
16
mkdumprd
@ -370,7 +370,9 @@ findstoragedriverinsys () {
|
|||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
|
|
||||||
modalias=$(cat $(find /sys/devices -name modalias | grep $(basename $(readlink ./device))))
|
[ -e modalias ] && modalias=$(cat modalias)
|
||||||
|
[ -e device ] && modalias=$(cat $(find /sys/devices -name modalias
|
||||||
|
| grep $(basename $(readlink ./device))))
|
||||||
|
|
||||||
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}
|
||||||
@ -1713,14 +1715,14 @@ for MODULE in $MODULES; do
|
|||||||
fullmodule=`echo $MODULE | sed "s|.*/||"`
|
fullmodule=`echo $MODULE | sed "s|.*/||"`
|
||||||
|
|
||||||
options=`sed -n -e "s/^options[ ][ ]*$module[ ][ ]*//p" $modulefile 2>/dev/null`
|
options=`sed -n -e "s/^options[ ][ ]*$module[ ][ ]*//p" $modulefile 2>/dev/null`
|
||||||
options2=`sed -n -e "s/^options[ ][ ]*$module[ ][ ]*//p" $KDUMP_CONFIG_FILE 2>/dev/null`
|
if [ -f "$KDUMP_CONFIG_FILE" ]; then
|
||||||
|
options2=`sed -n -e "s/^options[ ][ ]*$module[ ][ ]*//p" $KDUMP_CONFIG_FILE 2>/dev/null`
|
||||||
# Overwrite options if option is specified in kdump.conf
|
# Overwrite options if option is specified in kdump.conf
|
||||||
if [ -n "$options2" ]; then
|
if [ -n "$options2" ]; then
|
||||||
options=$options2
|
options=$options2
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -n "$options" ]; then
|
if [ -n "$options" ]; then
|
||||||
vecho "Adding module $module$text with options $options"
|
vecho "Adding module $module$text with options $options"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user