On Mon, Aug 04, 2014 at 04:16:36PM +0530, Hari Bathini wrote:
In fadump, in case of failure while rebuilding initrd, the error
status
is not handled properly. See code snippet below:
$MKDUMPRD $target_initrd_tmp --rebuild $TARGET_INITRD --kver $kdump_kver \
-i /tmp/fadump.initramfs /etc/fadump.initramfs
rm -f /tmp/fadump.initramfs
if [ $? != 0 ]; then
echo "mkdumprd: failed to rebuild initrd with fadump support"
>&2
return 1
fi
This patch fixes this issue
Signed-off-by: Hari Bathini <hbathini(a)linux.vnet.ibm.com>
Thanks Hari for the fix.
Acked-by: Vivek Goyal <vgoyal(a)redhat.com>
Vivek
---
kdumpctl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl
index 98de747..2bac6df 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -156,11 +156,12 @@ rebuild_fadump_initrd()
target_initrd_tmp="$TARGET_INITRD.tmp"
$MKDUMPRD $target_initrd_tmp --rebuild $TARGET_INITRD --kver $kdump_kver \
-i /tmp/fadump.initramfs /etc/fadump.initramfs
- rm -f /tmp/fadump.initramfs
if [ $? != 0 ]; then
echo "mkdumprd: failed to rebuild initrd with fadump support" >&2
+ rm -f /tmp/fadump.initramfs
return 1
fi
+ rm -f /tmp/fadump.initramfs
# updating fadump initrd
mv $target_initrd_tmp $TARGET_INITRD