On 07/04/17 at 01:45pm, Xunlei Pang wrote:
In case of only nfs/ssh target, we can clearly and safely remove more unnecessary modules to reduce initramfs size, and to enhance stability.
Signed-off-by: Xunlei Pang xlpang@redhat.com
mkdumprd | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/mkdumprd b/mkdumprd index ad44325..8bb883a 100644 --- a/mkdumprd +++ b/mkdumprd @@ -394,13 +394,14 @@ is_lvm() omit_dracut_modules() { local target majmin
- local has_crypt has_lvm
- local has_crypt has_lvm all_nfs_ssh
Just pass by and saw your discussion about the name of all_nfs_ssh.
In fact, here I suppose you are trying to define a variable of bool type. It should be like 'is_crypt_existed or crypt_detected' things. We can't define a variable naming as a verb plus a noun, this is more like a function naming. Just my personal opinion.
# Skip fadump case is_fadump_capable && return has_crypt=0 has_lvm=0
all_nfs_ssh=1
for target in $(get_kdump_targets); do if [ -b "$target" ]; then
@@ -411,6 +412,9 @@ omit_dracut_modules() # Check "lvm" check_block_and_slaves is_lvm $majmin && has_lvm=1 fi
# Check nfs/ssh dumping
[[ "$target" != "nfs" && "$target" != "ssh" ]] && all_nfs_ssh=0
done
# Omit "crypt", BZ1451717
@@ -423,6 +427,12 @@ omit_dracut_modules() # "has_lvm=0" implies "has_crypt=0" add_dracut_arg "--omit" "lvm dm multipath dmraid" fi
- # Further omit more modules in case of nfs/ssh dumping
- if [ "$all_nfs_ssh" == "1" ]; then
# "all_nfs_ssh=1" implies "has_lvm=0"
add_dracut_arg "--omit" "iscsi fcoe fcoe-uefi"
- fi
}
if ! check_resettable; then
1.8.3.1 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org