Class: TargetIO::Shadow::Passwd

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/target_io/shadow.rb

Class Method Summary collapse

Class Method Details

.method_missing(m, *args, **kwargs, &block) ⇒ Object



31
32
33
34
35
36
37
38
39
40
# File 'lib/chef/target_io/shadow.rb', line 31

def method_missing(m, *args, **kwargs, &block)
  Chef::Log.debug format("Shadow::Passwd::%s(%s)", m.to_s, args.join(", "))

  if ChefConfig::Config.target_mode? && !Chef.run_context.transport_connection.os.unix?
    raise "Shadow support only on Unix, this is " + Chef.run_context.transport_connection.platform.title
  end

  backend = ChefConfig::Config.target_mode? ? TrainCompat::Shadow::Passwd : ::Shadow::Passwd
  backend.send(m, *args, **kwargs, &block)
end