kdumpctl: Do not rebuild initramfs when $KDUMP_BOOTDIR is read only
When $KDUMP_BOOTDIR is RO then kexec-tools should not try rebuild initramfs even when conditions for rebuild is met. Signed-off-by: Pratyush Anand <panand@redhat.com> Acked-by: Baoquan He <bhe@redhat.com> Acked-by: Dave Young <dyoung@redhat.com>
This commit is contained in:
parent
698fc10076
commit
8d44a2853d
5
kdumpctl
5
kdumpctl
@ -406,6 +406,11 @@ check_rebuild()
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ! -w "$KDUMP_BOOTDIR" ]];then
|
||||||
|
echo "$KDUMP_BOOTDIR does not have write permission. Can not rebuild $TARGET_INITRD"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Rebuilding $TARGET_INITRD"
|
echo "Rebuilding $TARGET_INITRD"
|
||||||
rebuild_initrd
|
rebuild_initrd
|
||||||
return $?
|
return $?
|
||||||
|
Loading…
Reference in New Issue
Block a user