Skip to content

Commit

Permalink
Fix: error occurred because "file not found" before converge recipe[t…
Browse files Browse the repository at this point in the history
…ools].
  • Loading branch information
sawanoboly committed Feb 20, 2013
1 parent 2882e67 commit 908047e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions recipes/add_joyent_attributes.rb
Expand Up @@ -13,6 +13,8 @@
case node['platform']
when "smartos"
Chef::Log.info "update attributes from sm-summary"
joyent_attrs = JSON.parse(`/opt/local/bin/sm-summary_json -j`)
node.set['joyent'] = joyent_attrs
if ::File.exist?("/opt/local/bin/sm-summary_json") then
joyent_attrs = JSON.parse(`/opt/local/bin/sm-summary_json -j`)
node.set['joyent'] = joyent_attrs
end
end

0 comments on commit 908047e

Please sign in to comment.