diff options
author | Thom May <thom@chef.io> | 2018-02-07 15:29:33 +0100 |
---|---|---|
committer | Thom May <thom@chef.io> | 2018-02-07 15:29:33 +0100 |
commit | 54f0d93f0811f8cf22e9cd1e33ac7044337b8130 (patch) | |
tree | f14656a651943356d7c61ec622457bb1a94c046f /lib/chef/provider/systemd_unit.rb | |
parent | f11e054070f54e72bf0c7110d0267bdd9a8f47d5 (diff) | |
download | chef-54f0d93f0811f8cf22e9cd1e33ac7044337b8130.tar.gz |
remove callers of passwd ohai plugintm/disable_chatty_ohai
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'lib/chef/provider/systemd_unit.rb')
-rw-r--r-- | lib/chef/provider/systemd_unit.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/provider/systemd_unit.rb b/lib/chef/provider/systemd_unit.rb index e1853bd984..dcef93bfde 100644 --- a/lib/chef/provider/systemd_unit.rb +++ b/lib/chef/provider/systemd_unit.rb @@ -227,10 +227,11 @@ class Chef def systemctl_opts @systemctl_opts ||= if new_resource.user + uid = Etc.getpwuid(new_resource.user).uid { :user => new_resource.user, :environment => { - "DBUS_SESSION_BUS_ADDRESS" => "unix:path=/run/user/#{node['etc']['passwd'][new_resource.user]['uid']}/bus", + "DBUS_SESSION_BUS_ADDRESS" => "unix:path=/run/user/#{uid}/bus", }, } else |