# class Chef::Provider::Group::Aix

### Public Instance Methods

create_group() click to toggle source

    # File lib/chef/provider/group/aix.rb, line 32
    def create_group
      command = "mkgroup"
      command << set_options << " #{@new_resource.group_name}"
      run_command(:command => command)
      modify_group_members
    end

manage_group() click to toggle source

    # File lib/chef/provider/group/aix.rb, line 39
    def manage_group
      command = "chgroup"
      options = set_options
      #Usage: chgroup [-R load_module] "attr=value" ... group
      if options.size > 0
        command << options << " #{@new_resource.group_name}"
        run_command(:command => command)
      end
      modify_group_members
    end

remove_group() click to toggle source

    # File lib/chef/provider/group/aix.rb, line 50
    def remove_group
      run_command(:command => "rmgroup #{@new_resource.group_name}")
    end

required_binaries() click to toggle source

    # File lib/chef/provider/group/aix.rb, line 26
    def required_binaries
      [ "/usr/bin/mkgroup",
        "/usr/bin/chgroup",
        "/usr/sbin/rmgroup" ]
    end

set_options() click to toggle source

    # File lib/chef/provider/group/aix.rb, line 54
    def set_options
      opts = ""
      { :gid => "id" }.sort { |a,b| a[0] <=> b[0] }.each do |field, option|
        if @current_resource.send(field) != @new_resource.send(field)
          if @new_resource.send(field)
            Chef::Log.debug("#{@new_resource} setting #{field.to_s} to #{@new_resource.send(field)}")
            opts << " '#{option}=#{@new_resource.send(field)}'"
          end
        end
      end
      opts
    end