diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-07-15 16:09:09 +0800 |
---|---|---|
committer | Geoff Levand <geoff@infradead.org> | 2013-07-23 09:44:45 -0700 |
commit | f41f900809ab0338f5c159b08f07de53dcb46ca3 (patch) | |
tree | 74d11dfe6494106465329a43b51f1a1aa76e0421 /utils/pb-udhcpc | |
parent | 3b3687fc3d902adcad636fce11c9ff7216b113f9 (diff) | |
download | petitboot-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-udhcpc | 4 |
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 '.' ' ')) |