summaryrefslogtreecommitdiffstats
path: root/utils/pb-udhcpc
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-07-15 16:09:09 +0800
committerGeoff Levand <geoff@infradead.org>2013-07-23 09:44:45 -0700
commitf41f900809ab0338f5c159b08f07de53dcb46ca3 (patch)
tree74d11dfe6494106465329a43b51f1a1aa76e0421 /utils/pb-udhcpc
parent3b3687fc3d902adcad636fce11c9ff7216b113f9 (diff)
downloadpetitboot-f41f900809ab0338f5c159b08f07de53dcb46ca3.zip
petitboot-f41f900809ab0338f5c159b08f07de53dcb46ca3.tar.gz
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 <jk@ozlabs.org>
Diffstat (limited to 'utils/pb-udhcpc')
-rw-r--r--utils/pb-udhcpc4
1 files 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 '.' ' '))
OpenPOWER on IntegriCloud