deal with nic rename issue
Resolves: bz810107 in case nic renaming we will failed to bring up network. Resolve this issue by pass mac addr to 2nd kernel cmdline, let dracut deal with the udev rename [v1->v2]: amwang: use ip instead of ifconfig Signed-off-by: Dave Young <dyoung@redhat.com>
This commit is contained in:
parent
b58723d935
commit
68da2e965e
@ -71,7 +71,8 @@ install() {
|
|||||||
# we are on the same subnet
|
# we are on the same subnet
|
||||||
_netdev=`echo $_netdev|awk '{print $3}'|head -n 1`
|
_netdev=`echo $_netdev|awk '{print $3}'|head -n 1`
|
||||||
fi
|
fi
|
||||||
echo " ip=$_netdev:dhcp rd.neednet=1" > ${initdir}/etc/cmdline.d/40ip.conf
|
_netmac=`ip addr show $_netdev 2>/dev/null|awk '/ether/{ print $2 }'`
|
||||||
|
echo " ip=$_netdev:dhcp ifname=$_netdev:$_netmac rd.neednet=1" > ${initdir}/etc/cmdline.d/40ip.conf
|
||||||
if is_bridge "$_netdev"; then
|
if is_bridge "$_netdev"; then
|
||||||
echo " bridge=$_netdev:$(cd /sys/class/net/$_netdev/brif/; echo *)" > ${initdir}/etc/cmdline.d/41bridge.conf
|
echo " bridge=$_netdev:$(cd /sys/class/net/$_netdev/brif/; echo *)" > ${initdir}/etc/cmdline.d/41bridge.conf
|
||||||
elif is_bond "$_netdev"; then
|
elif is_bond "$_netdev"; then
|
||||||
|
Loading…
Reference in New Issue
Block a user