From dcffd4759e56169d5f8f1522c84f9fb0a0de7715 Mon Sep 17 00:00:00 2001 From: Xunlei Pang Date: Wed, 30 Aug 2017 16:45:42 +0800 Subject: [PATCH] Revert "mkdumprd: omit dracut modules in case of no dm target" This reverts commit 821d1af0804825f01bdd540b626d81ea95a5414a. We are going to add "--no-hostonly-default-device" dracut argument in the following patch. With the help of "--no-hostonly-default-device", dracut only adds the dump target as host devices, which naturally guarantees only required dracut modules being selected. Signed-off-by: Xunlei Pang Acked-by: Dave Young --- mkdumprd | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/mkdumprd b/mkdumprd index 68fe6e8..8a2fe74 100644 --- a/mkdumprd +++ b/mkdumprd @@ -359,44 +359,16 @@ check_crypt() return 1 } -is_dm() -{ - if [ -d "/sys/dev/block/$1/dm" ]; then - return 0 - fi - - return 1 -} - crypt_exists=0 omit_dracut_modules() { - local target majmin - local dm_exists - # Skip fadump case is_fadump_capable && return - dm_exists=0 - - for target in $(get_kdump_targets); do - if [ -b "$target" ]; then - majmin=$(get_maj_min $target) - # Check "dm" - check_block_and_slaves is_dm $majmin && dm_exists=1 - fi - done - # Omit "crypt", BZ1451717 if [ "$crypt_exists" == "0" ]; then add_dracut_arg "--omit" "crypt" fi - - # Further omit more modules in case of no dm related target - if [ "$dm_exists" == "0" ]; then - # "dm_exists=0" implies "crypt_exists=0" - add_dracut_arg "--omit" "lvm dm multipath dmraid" - fi } if ! check_resettable; then