Skip to content

Commit

Permalink
fb_systemd: fix ohai key
Browse files Browse the repository at this point in the history
Summary:
this was merged upstream in chef/ohai#766 so
change it to reference the correct key

Reviewed By: patcox

Differential Revision: D3331130

fbshipit-source-id: 63f0aa1244de438187461a88863ecc783a08255e
  • Loading branch information
davide125 committed Sep 20, 2016
1 parent 61359f4 commit 6fb1566
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cookbooks/fb_systemd/providers/reload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ def whyrun_supported?
command '/bin/systemctl daemon-reload'
end
when 'user'
unless node['fb']['sessions'] && node['fb']['sessions']['by_user']
unless node['sessions'] && node['sessions']['by_user']
Chef::Log.info('Requested to reload systemd user instance for all ' +
'users, but there are no sessions to reload')
return
end
logged_in = node['fb']['sessions']['by_user'].keys
logged_in = node['sessions']['by_user'].keys
if new_resource.user
unless logged_in.include?(new_resource.user)
Chef::Log.info('Requested to reload systemd user instance for ' +
Expand All @@ -34,7 +34,7 @@ def whyrun_supported?
end
users = [new_resource.user]
else
users = node['fb']['sessions']['by_user'].to_hash.keys.sort
users = node['sessions']['by_user'].to_hash.keys.sort
end
users.each do |user|
unless node['etc']['passwd'][user]
Expand Down

0 comments on commit 6fb1566

Please sign in to comment.