Permalink
Browse files

Two fixes for RedHat:

- 'property' was renamed to 'prop', so fix the error message
- the 'netmask' as described in the README doesn't work on RedHat:
  NoMethodError: undefined method `length' for 24:Fixnum
  so use the "Debian-style" notation there too.
  • Loading branch information...
1 parent 1b2deba commit 9f794cc241654aac84956a664f8edd5b7820b5f1 @jasperla jasperla committed Sep 4, 2013
Showing with 3 additions and 3 deletions.
  1. +2 −2 README.markdown
  2. +1 −1 lib/puppet/provider/network_route/redhat.rb
View
@@ -52,14 +52,14 @@ Route configuration
ensure => 'present',
gateway => '10.0.2.2',
interface => 'eth0',
- netmask => '24',
+ netmask => '255.255.255.0',
network => '172.17.67.0'
}
network_route { 'default':
ensure => 'present',
gateway => '10.0.2.2',
interface => 'eth0',
- netmask => '',
+ netmask => '0.0.0.0',
network => 'default'
}
@@ -77,7 +77,7 @@ def self.format_file(filename, providers)
# Build routes
providers.sort_by(&:name).each do |provider|
[:network, :netmask, :gateway, :interface].each do |prop|
- raise Puppet::Error, "#{provider.name} does not have a #{property}." if provider.send(prop).nil?
+ raise Puppet::Error, "#{provider.name} does not have a #{prop}." if provider.send(prop).nil?
end
if provider.network == "default"
contents << "#{provider.network} via #{provider.gateway} dev #{provider.interface}\n"

0 comments on commit 9f794cc

Please sign in to comment.