Remove "ip=" overwrite to 40ip.conf

Currently we overwrite 40ip.conf to make ip and ifname both at the first
line. But getarg() of dracut doesn't have the limitation that all
cmdline args should be at the first line. Therefore, we can remove the
overwrite safely.

After applying this patch, in 2nd kernel,

kdump:/# cat /etc/cmdline.d/40ip.conf
 ip=eth0:dhcp
 ifname=eth0:52:54:00:b2:98:05
kdump:/# source /usr/lib/dracut/dracut-lib.sh
kdump:/# getarg ip
ip=eth0:dhcp
kdump:/# getarg ifname
ifname=eth0:52:54:00:b2:98:05

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Baoquan He <bhe@redhat.com>
This commit is contained in:
WANG Chao 2013-05-14 11:11:22 +08:00 committed by Baoquan He
parent 233bd8765e
commit c3635964c4

View File

@ -198,7 +198,6 @@ kdump_setup_netdev() {
elif kdump_is_vlan "$_netdev"; then
kdump_setup_vlan "$_netdev"
else
echo -n " ip=${_static}$_netdev:${_proto}" > ${initdir}/etc/cmdline.d/40ip.conf
echo " ifname=$_netdev:$(kdump_get_mac_addr $_netdev)" >> ${initdir}/etc/cmdline.d/40ip.conf
fi