# File lib/chef/provider/ifconfig.rb, line 70 def action_add # check to see if load_current_resource found ifconfig unless @current_resource.inet_addr unless @new_resource.device == "lo" command = "ifconfig #{@new_resource.device} #{@new_resource.name}" command << " netmask #{@new_resource.mask}" if @new_resource.mask command << " metric #{@new_resource.metric}" if @new_resource.metric command << " mtu #{@new_resource.mtu}" if @new_resource.mtu end run_command( :command => command ) @new_resource.updated_by_last_action(true) end # Write out the config files generate_config end