Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to netmask.rb for AIX #617

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/facter/netmask.rb
Expand Up @@ -16,7 +16,7 @@
require 'facter/util/netmask'

Facter.add("netmask") do
confine :kernel => [ :sunos, :linux, :freebsd, :openbsd, :netbsd, :darwin, :"gnu/kfreebsd", :dragonfly ]
confine :kernel => [ :sunos, :linux, :freebsd, :openbsd, :netbsd, :darwin, :"gnu/kfreebsd", :dragonfly, :AIX ]
setcode do
Facter::NetMask.get_netmask
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facter/util/ip.rb
Expand Up @@ -111,7 +111,7 @@ def self.exec_ifconfig(additional_arguments=[])
#
# @api private
def self.get_ifconfig
common_paths=["/bin/ifconfig","/sbin/ifconfig","/usr/sbin/ifconfig"]
common_paths=["/bin/ifconfig","/sbin/ifconfig","/usr/sbin/ifconfig","/etc/ifconfig"]
common_paths.select{|path| File.executable?(path)}.first
end

Expand Down
2 changes: 1 addition & 1 deletion lib/facter/util/netmask.rb
Expand Up @@ -11,7 +11,7 @@ def self.get_netmask
:regex => %r{#{Facter.ipaddress}.*?(?:Mask:|netmask)\s*(#{ipregex})}x,
:munge => nil,
}
when 'SunOS'
when 'SunOS','AIX'
ops = {
:ifconfig_opts => ['-a'],
:regex => %r{\s+ inet \s #{Facter.ipaddress} \s netmask \s (\w{8})}x,
Expand Down