Fix warning in ip.rb which precluded cobbler test from passing

This commit is contained in:
Eugene Kirpichov 2012-09-24 12:45:13 -07:00
parent 907bd19d96
commit 4380dc8860

View File

@ -179,7 +179,11 @@ Puppet::Type.type(:network_interface).provide(:ip) do
end
#FIXME Need to support multiple inet & inet6 hashes
IP_ARGS = [ "qlen", "mtu", "address" ]
# I've no idea why this is executed more than once and whether it's expected,
# but without the "unless defined?" part, a warning is emitted which our
# tests don't like.
IP_ARGS = [ "qlen", "mtu", "address" ] unless defined?(IP_ARGS)
IP_ARGS.each do |ip_arg|
define_method(ip_arg.to_s.downcase) do