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:
WANG Chao 2013-06-13 10:06:26 +08:00 committed by Baoquan He
parent 671e18f43b
commit 7b19ef79c3
1 changed files with 1 additions and 1 deletions

View File

@ -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