dracut-module-setup.sh: use kernel exported mac address in kdump_get_mac_addr()
kernel has exported mac address for each interface, we can get it directly instead of parsing the output from ip address show. Signed-off-by: WANG Chao <chaowang@redhat.com> Acked-by: Baoquan He <bhe@redhat.com>
This commit is contained in:
parent
671e18f43b
commit
7b19ef79c3
@ -83,7 +83,7 @@ kdump_static_ip() {
|
||||
}
|
||||
|
||||
kdump_get_mac_addr() {
|
||||
echo `ip addr show $1 2>/dev/null|awk '/ether/{ print $2 }'`
|
||||
cat /sys/class/net/$1/address
|
||||
}
|
||||
|
||||
#Bonding or team master modifies the mac address
|
||||
|
Loading…
Reference in New Issue
Block a user