On 06/30/17 at 11:18am, Xunlei Pang wrote:
Resolves: bz1451717
https://bugzilla.redhat.com/1451717
When there is no crypt related kdump target, we can safely
omit "crypt" dracut module, this can avoid the pop asking
disk password during kdump boot in some cases.
Xunlei, it can save memory, but if there is no crypt target why still
asking user for password?
>
> Signed-off-by: Xunlei Pang <xlpang(a)redhat.com>
> ---
> mkdumprd | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/mkdumprd b/mkdumprd
> index 45b185a..97722df 100644
> --- a/mkdumprd
> +++ b/mkdumprd
> @@ -401,6 +401,30 @@ check_crypt()
> return 1
> }
>
> +omit_dracut_modules()
> +{
> + local target majmin
> + local has_crypt
> +
> + # Skip fadump case
> + [ -z "$KDUMP_TARGETS" ] && return
> +
> + has_crypt=0
> +
> + for target in $KDUMP_TARGETS; do
> + if [ -b "$target" ]; then
> + # Check "crypt"
> + majmin=$(get_maj_min $target)
> + check_block_and_slaves is_crypt $majmin && has_crypt=1
> + fi
> + done
> +
> + # Omit "crypt", BZ1451717
> + if [ "$has_crypt" == "0" ]; then
> + add_dracut_arg "--omit" "crypt"
> + fi
> +}
> +
> if ! check_resettable; then
> exit 1
> fi
> @@ -490,6 +514,8 @@ then
> add_dracut_arg "--add-drivers" "$extra_modules"
> fi
>
> +omit_dracut_modules
> +
> dracut "${dracut_args[@]}" "$@"
> _rc=$?
> sync
> --
> 1.8.3.1
> _______________________________________________
> kexec mailing list -- kexec(a)lists.fedoraproject.org
> To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org