Issue #6827 has been updated by Ben Hughes.
If we're going down this route, we may as well go the whole hog...
<pre>
[ben@Paresthesia:facter]% strings `which ifconfig` | grep -iE "10.*base"
10baseT/UTP
10base2/BNC
10base5/AUI
100baseTX
100baseFX
100baseT4
100baseVG
100baseT2
1000baseSX
10baseSTP
10baseFL
1000baseLX
1000baseCX
1000baseT
10GbaseSR
10GbaseLR
10GbaseCX4
10GbaseT
</pre>
As Xserves _might_ have 10gig cards in them....
<pre>
diff --git a/lib/facter/macaddress.rb b/lib/facter/macaddress.rb
index e8f40dc..9403df6 100644
--- a/lib/facter/macaddress.rb
+++ b/lib/facter/macaddress.rb
@@ -31,7 +31,7 @@ Facter.add(:macaddress) do
output = %x{/sbin/ifconfig}
output.split(/^\S/).each do |str|
- if str =~ /10baseT/ # we're wired
+ if str =~ /10{1,3}G?base/ # we're wired
str =~ /ether (\w\w:\w\w:\w\w:\w\w:\w\w:\w\w)/
ether = $1
end
</pre>
Does that work for you as well please?
----------------------------------------
Bug #6827: Won't find Mac Address on Mac OSX if better than 10M ethernet in
version 1.5.8
https://projects.puppetlabs.com/issues/6827
Author: Steve Simpson
Status: Investigating
Priority: Normal
Assignee: Ben Hughes
Category: library
Target version: 1.5.9
Keywords: Mac OSX Address
Branch:
The current match fails because the interface is 1000baseT not 10baseT. The
method in the trunk does work, so not sure how big of an issue this is.
ifconfig
...
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 58:b0:35:xx:xx:xx
inet6 fe80::5ab0:35xx:xx:xxxx%en0 prefixlen 64 scopeid 0x4
inet xxx.xxx.xxx.xxx netmask 0xffffffc0 broadcast xxx.xxx.xxx.xxx
inet6 xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx prefixlen 64 autoconf
media: autoselect (1000baseT <full-duplex,flow-control>)
status: active
...
Index: facter-1.5.8/lib/facter/macaddress.rb
===================================================================
--- facter-1.5.8/lib/facter/macaddress.rb (revision 5)
+++ facter-1.5.8/lib/facter/macaddress.rb (working copy)
@@ -31,7 +31,7 @@
output = %x{/sbin/ifconfig}
output.split(/^\S/).each do |str|
- if str =~ /10baseT/ # we're wired
+ if str =~ /10baseT/ || str =~ /100baseT/ || str =~ /1000baseT/
# we're wired
str =~ /ether (\w\w:\w\w:\w\w:\w\w:\w\w:\w\w)/
ether = $1
end
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.