Bug 683769 - mkdumprd basename: missing operand
Summary: mkdumprd basename: missing operand
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kexec-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Neil Horman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-10 11:01 UTC by Lukas Bezdicka
Modified: 2011-03-28 15:10 UTC (History)
3 users (show)

Fixed In Version: kexec-tools-2.0.0-45
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-28 15:10:04 UTC
Type: ---


Attachments (Terms of Use)
Proposed fix (1.03 KB, text/plain)
2011-03-14 17:50 UTC, Lubomir Rintel
no flags Details
Another fixup needed for mkdumprd to finish (1.31 KB, application/octet-stream)
2011-03-14 17:52 UTC, Lubomir Rintel
no flags Details

Description Lukas Bezdicka 2011-03-10 11:01:03 UTC
Description of problem:
mkdumprd -f /boot/initramfs-2.6.38-0.rc8.git0.1.fc15.x86_64.img 2.6.38-0.rc8.git0.1.fc15.x86_64
basename: missing operand
Try `basename --help' for more information.
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.


How reproducible:
always

Additional info:
kexec-tools-2.0.0-41.fc15.x86_64

seems to be problem on line 375 in mkdumprd

Comment 1 Takasimadaira 2011-03-11 01:23:18 UTC
Try "mkdumprd -d -f /boot/initramfs-2.6.38-0.rc8.git0.1.fc15.x86_64.img
2.6.38-0.rc8.git0.1.fc15.x86_64"

Read /etc/rc.d/init.d/kdump and you can understand.

Comment 2 Lukas Bezdicka 2011-03-11 10:43:01 UTC
mkdumprd -d -f /boot/initramfs-2.6.38-0.rc8.git0.1.fc15.x86_64.img 2.6.38-0.rc8.git0.1.fc15.x86_64
basename: missing operand
Try `basename --help' for more information.
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.

I reported it because /etc/rc.d/init.d/kdump fails.
kdump.conf:
path /var/crash
ext4 UUID=416ba429-4dba-49a1-aa44-1b3837fff2ea
core_collector makedumpfile -c

Comment 3 Neil Horman 2011-03-11 14:11:36 UTC
There is no use of the basename command on line 375 in mkdumprd.  Can you run the mkdumprd command with set -x appended right after the top line in the file?

Comment 4 Lukas Bezdicka 2011-03-11 16:46:11 UTC
sorry I had some debug stuff there already, it's 
    modalias=$(cat $(find /sys/devices -name modalias | grep $(basename $(readlink ./device))))

+ '[' -z /sys/block/sda ']'
+ pushd /sys/block/sda
+ findstoragedriverinsys
+ '[' '!' -L device ']'
++ readlink ./device
+ cd ../../../0:0:0:0
+ '[' '!' -f modalias ']'
+++ find /sys/devices -name modalias
+++++ readlink ./device
++++ basename
basename: missing operand
Try `basename --help' for more information.
+++ grep
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
++ cat

Comment 5 Lubomir Rintel 2011-03-14 17:50:28 UTC
Created attachment 484262 [details]
Proposed fix

Saw it as well; this fixed that.

Comment 6 Lubomir Rintel 2011-03-14 17:52:18 UTC
Created attachment 484263 [details]
Another fixup needed for mkdumprd to finish

Attaching another fix here, that was needed for mkdumprd to finish correctly so that fix the original issue could be verified.

Comment 7 Lukas Bezdicka 2011-03-14 19:23:43 UTC
thanks a lot, works for me.

Comment 8 Neil Horman 2011-03-28 15:10:04 UTC
fixed in kexec-tools-2.0.0-45.  Thanks!


Note You need to log in before you can comment on or make changes to this bug.