Please review pull request #205: (#12147) Remove Darwin 6-specific iphostnumber fact opened by (jeffweiss)
Description:
The iphostnumber fact only resolves on version 6 of the Darwin kernel.
This commit removes a fact that only exists on an unsupported platform.
(aka Jaguar). The official minimum supported version is 8 (aka Tiger).
Darwin 6 was replaced with Panther in October 2003.
- Opened: Sat May 12 06:21:04 UTC 2012
- Based on: puppetlabs:master (f6fb7b7c97aae577f20241723f242f5b13644289)
- Requested merge: jeffweiss:ticket/master/12147_remove_iphostnumber_fact (9f01fe72b3cc13ffa9c8f2996056b51b2ce50e92)
Diff follows:
diff --git a/lib/facter/iphostnumber.rb b/lib/facter/iphostnumber.rb
deleted file mode 100644
index 2d22017..0000000
--- a/lib/facter/iphostnumber.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# Fact: iphostnumber
-#
-# Purpose: On selected versions of Darwin, returns the host's IP address.
-#
-# Resolution:
-# Uses either the scutil program to get the localhost name, or parses output
-# of ifconfig for a MAC address.
-#
-# Caveats:
-#
-
-Facter.add(:iphostnumber) do
- confine :kernel => :darwin, :kernelrelease => "R6"
- setcode do
- %x{/usr/sbin/scutil --get LocalHostName}
- end
-end
-Facter.add(:iphostnumber) do
- confine :kernel => :darwin, :kernelrelease => "R6"
- setcode do
- ether = nil
- output = %x{/sbin/ifconfig}
-
- output =~ /HWaddr (\w\w:\w\w:\w\w:\w\w:\w\w:\w\w)/
- ether = $1
-
- ether
- end
-end
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" 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-dev?hl=en.
