From 7b19ef79c3e28487468b4695cbad72161004a594 Mon Sep 17 00:00:00 2001 From: WANG Chao Date: Thu, 13 Jun 2013 10:06:26 +0800 Subject: [PATCH] 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 Acked-by: Baoquan He --- dracut-module-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 23f7bd6..428918c 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -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