Skip to content

Commit

Permalink
Merge pull request #57 from jasperla/redhat_fixes
Browse files Browse the repository at this point in the history
Two fixes for RedHat:
  • Loading branch information
adrienthebo committed Sep 6, 2013
2 parents 1b2deba + 9f794cc commit 75f4fc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/network_route/redhat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 75f4fc5

Please sign in to comment.