summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/provider/route.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/provider/route.rb b/lib/chef/provider/route.rb
index ed1f1f4c4d..b23d0307cc 100644
--- a/lib/chef/provider/route.rb
+++ b/lib/chef/provider/route.rb
@@ -174,7 +174,7 @@ class Chef
conf[dev] = "" if conf[dev].nil?
case @action
when :add
- conf[dev] << config_file_contents(:add, comment: resource.comment, target: resource.target, metric: resource.metric, netmask: resource.netmask, gateway: resource.gateway) if resource.action == [:add]
+ conf[dev] << config_file_contents(:add, comment: resource.comment, device: resource.device, target: resource.target, metric: resource.metric, netmask: resource.netmask, gateway: resource.gateway) if resource.action == [:add]
when :delete
# need to do this for the case when the last route on an int
# is removed
@@ -236,6 +236,7 @@ class Chef
content << (options[:target]).to_s
content << "/#{MASK[options[:netmask].to_s]}" if options[:netmask]
content << " via #{options[:gateway]}" if options[:gateway]
+ content << " dev #{options[:device]}" if options[:device]
content << " metric #{options[:metric]}" if options[:metric]
content << "\n"
end