From f41f900809ab0338f5c159b08f07de53dcb46ca3 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Mon, 15 Jul 2013 16:09:09 +0800 Subject: [PATCH] pb-udhcp: Fix MAC-address-based configuration file location We're currently requesting a colon-separated MAC address. Instead, we need it to be hypen-separated, and prefixed with the ethernet type ("01-"). Signed-off-by: Jeremy Kerr --- utils/pb-udhcpc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/pb-udhcpc b/utils/pb-udhcpc index 729de08..252bb11 100644 --- a/utils/pb-udhcpc +++ b/utils/pb-udhcpc @@ -38,8 +38,8 @@ do_pxe() { params="conf@/net/${interface} method=dhcp" # first, try by MAC - mac=$(cat /sys/class/net/$interface/address) - pb-event $params url=$basedir/$mac + mac=$(tr ':' '-' < /sys/class/net/$interface/address) + pb-event $params url=$basedir/01-$mac # try decreasing fragments of IP lease ip_hex=$(printf '%02X%02X%02X%02X' $(echo $ip | tr '.' ' ')) -- 2.39.2