Sha256: 85ec3dc282f5e0499f01c42298a8f2241fb66c89410ade62de1ef43db256c26c

Contents?: true

Size: 421 Bytes

Versions: 9

Compression:

Stored size: 421 Bytes

Contents

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
facter-1.5.9 lib/facter/iphostnumber.rb
facter-1.5.8 lib/facter/iphostnumber.rb
facter-1.5.7 lib/facter/iphostnumber.rb
facter-1.5.5 lib/facter/iphostnumber.rb
facter-1.5.3 lib/facter/iphostnumber.rb
facter-1.5.4 lib/facter/iphostnumber.rb
facter-1.5 lib/facter/iphostnumber.rb
facter-1.5.6 lib/facter/iphostnumber.rb
facter-1.5.2 lib/facter/iphostnumber.rb