diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-05-10 15:35:11 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-05-10 15:35:11 -0700 |
commit | b3a1cc9165904e6be09b8a62065e9289a905bfb4 (patch) | |
tree | 9810a8e7f2b763b7fc765683de5c8f2116371396 /lib/chef/provider/user | |
parent | b584400b5f7b7e315e9602937c4803d453bad3ab (diff) | |
download | chef-b3a1cc9165904e6be09b8a62065e9289a905bfb4.tar.gz |
clean up updating_home?lcg/cleanup-user
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider/user')
-rw-r--r-- | lib/chef/provider/user/aix.rb | 6 | ||||
-rw-r--r-- | lib/chef/provider/user/linux.rb | 7 | ||||
-rw-r--r-- | lib/chef/provider/user/solaris.rb | 9 |
3 files changed, 0 insertions, 22 deletions
diff --git a/lib/chef/provider/user/aix.rb b/lib/chef/provider/user/aix.rb index e89e56d90b..be6ff9d750 100644 --- a/lib/chef/provider/user/aix.rb +++ b/lib/chef/provider/user/aix.rb @@ -103,12 +103,6 @@ class Chef opts end - # FIXME: move to superclass, and one of these implements must be buggy? - def updating_home? - return true if current_resource.home.nil? && new_resource.home - new_resource.home && Pathname.new(current_resource.home).cleanpath != Pathname.new(new_resource.home).cleanpath - end - private def add_password diff --git a/lib/chef/provider/user/linux.rb b/lib/chef/provider/user/linux.rb index 3aac717242..a846d2657a 100644 --- a/lib/chef/provider/user/linux.rb +++ b/lib/chef/provider/user/linux.rb @@ -85,13 +85,6 @@ class Chef opts end - # FIXME: move to superclass, and one of these implementations must be buggy? - def updating_home? - return false unless new_resource.home - return true unless current_resource.home - new_resource.home && Pathname.new(current_resource.home).cleanpath != Pathname.new(new_resource.home).cleanpath - end - def check_lock # there's an old bug in rhel (https://bugzilla.redhat.com/show_bug.cgi?id=578534) # which means that both 0 and 1 can be success. diff --git a/lib/chef/provider/user/solaris.rb b/lib/chef/provider/user/solaris.rb index a635899505..1abe660cfd 100644 --- a/lib/chef/provider/user/solaris.rb +++ b/lib/chef/provider/user/solaris.rb @@ -110,15 +110,6 @@ class Chef opts end - def updating_home? - # will return false if paths are equivalent - # Pathname#cleanpath does a better job than ::File::expand_path (on both unix and windows) - # ::File.expand_path("///tmp") == ::File.expand_path("/tmp") => false - # ::File.expand_path("\\tmp") => "C:/tmp" - return true if current_resource.home.nil? && new_resource.home - new_resource.home && Pathname.new(current_resource.home).cleanpath != Pathname.new(new_resource.home).cleanpath - end - def manage_password return unless current_resource.password != new_resource.password && new_resource.password logger.trace("#{new_resource} setting password to #{new_resource.password}") |