dracut-module-setup: avoid writing the vlan.conf twice
We handle different types of device for vlan. For each type, it should write different options for vlan.conf in each control path. Signed-off-by: WANG Chao <chaowang@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
parent
10b2ee22ef
commit
fd4bd5552b
@ -154,8 +154,6 @@ kdump_setup_vlan() {
|
|||||||
local _phydev="$(awk '/^Device:/{print $2}' /proc/net/vlan/"$_netdev")"
|
local _phydev="$(awk '/^Device:/{print $2}' /proc/net/vlan/"$_netdev")"
|
||||||
local _netmac="$(kdump_get_mac_addr $_phydev)"
|
local _netmac="$(kdump_get_mac_addr $_phydev)"
|
||||||
|
|
||||||
echo " vlan=$_netdev:$_phydev" > ${initdir}/etc/cmdline.d/43vlan.conf
|
|
||||||
|
|
||||||
#Just support vlan over bond, it is not easy
|
#Just support vlan over bond, it is not easy
|
||||||
#to support all other complex setup
|
#to support all other complex setup
|
||||||
if kdump_is_bridge "$_phydev"; then
|
if kdump_is_bridge "$_phydev"; then
|
||||||
@ -166,6 +164,7 @@ kdump_setup_vlan() {
|
|||||||
exit 1
|
exit 1
|
||||||
elif kdump_is_bond "$_phydev"; then
|
elif kdump_is_bond "$_phydev"; then
|
||||||
kdump_setup_bond "$_phydev"
|
kdump_setup_bond "$_phydev"
|
||||||
|
echo " vlan=$_netdev:$_phydev" > ${initdir}/etc/cmdline.d/43vlan.conf
|
||||||
else
|
else
|
||||||
echo " vlan=$_netdev:$_phydev ifname=$_phydev:$_netmac" > ${initdir}/etc/cmdline.d/43vlan.conf
|
echo " vlan=$_netdev:$_phydev ifname=$_phydev:$_netmac" > ${initdir}/etc/cmdline.d/43vlan.conf
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user