diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/provider/ifconfig/debian.rb | 6 | ||||
-rw-r--r-- | lib/chef/resource/ifconfig.rb | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/chef/provider/ifconfig/debian.rb b/lib/chef/provider/ifconfig/debian.rb index 369c222b7a..e1e978fdde 100644 --- a/lib/chef/provider/ifconfig/debian.rb +++ b/lib/chef/provider/ifconfig/debian.rb @@ -36,11 +36,11 @@ class Chef <% if new_resource.onboot == "yes" %>auto <%= new_resource.device %><% end %> <% case new_resource.bootproto when "dhcp" %> -iface <%= new_resource.device %> inet dhcp +iface <%= new_resource.device %> <%= new_resource.family %> dhcp <% when "bootp" %> -iface <%= new_resource.device %> inet bootp +iface <%= new_resource.device %> <%= new_resource.family %> bootp <% else %> -iface <%= new_resource.device %> inet static +iface <%= new_resource.device %> <%= new_resource.family %> static <% if new_resource.target %>address <%= new_resource.target %><% end %> <% if new_resource.mask %>netmask <%= new_resource.mask %><% end %> <% if new_resource.network %>network <%= new_resource.network %><% end %> diff --git a/lib/chef/resource/ifconfig.rb b/lib/chef/resource/ifconfig.rb index e9ef47d95b..d80abd090d 100644 --- a/lib/chef/resource/ifconfig.rb +++ b/lib/chef/resource/ifconfig.rb @@ -38,6 +38,7 @@ class Chef property :target, String, name_property: true property :hwaddr, String property :mask, String + property :family, String, default: 'inet' property :inet_addr, String property :bcast, String property :mtu, String |