Sha256: ac509ff67a608080dd0b3ce008d53e80a80fff417a4708fff4bedd636ee12112

Contents?: true

Size: 827 Bytes

Versions: 3

Compression:

Stored size: 827 Bytes

Contents

require 'puppet/provider/nameservice/pw'

Puppet::Type.type(:group).provide :pw, :parent => Puppet::Provider::NameService::PW do
    desc "Group management via ``pw``.  Only works on FreeBSD."

    commands :pw => "/usr/sbin/pw"
    defaultfor :operatingsystem => :freebsd

    verify :gid, "GID must be an integer" do |value|
        value.is_a? Integer
    end

    def addcmd
        cmd = [command(:pw), "groupadd", @resource[:name]]
        if gid = @resource.should(:gid)
            unless gid == :absent
                cmd << flag(:gid) << gid
            end
        end

        # Apparently, contrary to the man page, groupadd does
        # not accept -o.
        #if @parent[:allowdupe] == :true
        #    cmd << "-o"
        #end

        return cmd
    end
end

# $Id: pw.rb 2501 2007-05-09 23:08:42Z luke $

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
puppet-0.23.0 lib/puppet/provider/group/pw.rb
puppet-0.23.1 lib/puppet/provider/group/pw.rb
puppet-0.23.2 lib/puppet/provider/group/pw.rb