Merge lp:~jason-hobbs/maas/fix-1409952-p8-enlistment-1.7 into lp:maas/1.7

Proposed by Jason Hobbs
Status: Merged
Approved by: Jason Hobbs
Approved revision: no longer in the source branch.
Merged at revision: 3336
Proposed branch: lp:~jason-hobbs/maas/fix-1409952-p8-enlistment-1.7
Merge into: lp:maas/1.7
Diff against target: 15 lines (+3/-2)
1 file modified
etc/maas/templates/commissioning-user-data/snippets/maas_enlist.sh (+3/-2)
To merge this branch: bzr merge lp:~jason-hobbs/maas/fix-1409952-p8-enlistment-1.7
Reviewer Review Type Date Requested Status
Jason Hobbs (community) Approve
Review via email: mp+246524@code.launchpad.net

Commit message

Merge r3461 from upstream. Allow ':' characters in MAC addresses.

To post a comment you must log in.
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Self approve backport.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'etc/maas/templates/commissioning-user-data/snippets/maas_enlist.sh'
2--- etc/maas/templates/commissioning-user-data/snippets/maas_enlist.sh 2014-12-09 19:29:10 +0000
3+++ etc/maas/templates/commissioning-user-data/snippets/maas_enlist.sh 2015-01-15 02:05:08 +0000
4@@ -25,8 +25,9 @@
5 macs=`ip addr | egrep 'link/ether' | cut -d' ' -f6`
6 # Obtain the BOOTIF MAC address from the kernel command line.
7 # Note that BOOTIF stores the MAC in the format of
8- # '01-AA-BB-CC-DD-EE-FF" and we remove the '01-'.
9- pxe_mac=`cat /proc/cmdline | egrep 'BOOTIF=' | sed -e 's/.*[[:space:]]BOOTIF=\([-0-9A-Fa-f]\+\).*/\1/g' -e 's,^01-,,g' -e 's,-,:,g'`
10+ # '01-AA-BB-CC-DD-EE-FF", or "01-AA:BB:CC:DD:EE:FF",
11+ # and we remove the '01-'.
12+ pxe_mac=`cat /proc/cmdline | egrep 'BOOTIF=' | sed -e 's/.*[[:space:]]BOOTIF=\([-:0-9A-Fa-f]\+\).*/\1/g' -e 's,^01-,,g' -e 's,-,:,g'`
13 # Initialize the mac_address variable with "$pxe_mac",
14 # otherwise "$pxe_mac" will be empty.
15 mac_addresses="$pxe_mac"

Subscribers

People subscribed via source and target branches

to all changes: