module-setup: fix 99kdumpbase network dependency
I noticed that network is still enabled for local dumping, like the following kdump boot message on my test machine using local disk as the dump target: tg3.c:v3.137 (May 11, 2014) tg3 0000:02:00.0 eth2: Tigon3 [partno(BCM95720) rev (PCI Express) MAC address c8:1f:66:c9:35:0d tg3 0000:02:00.0 eth2: attached PHY is 5720C After some debugging, found it due to a misuse in code below: if [ is_generic_fence_kdump -o is_pcs_fence_kdump ]; then _dep="$_dep network" fi The "if" condition always results in "true", and should be changed as follows: if is_generic_fence_kdump -o is_pcs_fence_kdump; then _dep="$_dep network" fi After this, network won't be involved in non-network dumping, as for dumpings require network such as nfs/ssh/iscsi/fcoe/etc, dracut will add network accordingly. And kdump initramfs size can be reduced from 24MB to 17MB tested on some real hardware, and from 19MB to 14MB on my kvm. Moreover, it could avoid the network (driver) initialization thereby saving us more memory. Signed-off-by: Xunlei Pang <xlpang@redhat.com> Acked-by: Dave Young <dyoung@redhat.com>
This commit is contained in:
parent
fb522e972c
commit
a431a7e354
@ -24,7 +24,7 @@ depends() {
|
||||
_dep="$_dep drm"
|
||||
fi
|
||||
|
||||
if [ is_generic_fence_kdump -o is_pcs_fence_kdump ]; then
|
||||
if is_generic_fence_kdump -o is_pcs_fence_kdump; then
|
||||
_dep="$_dep network"
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user