You have to do this unless we copy and paste the addcmd from the parent
class. This seemed like a worse approach in terms of DRY programming.


On Mon, Oct 7, 2013 at 12:44 PM, Adrien Thebo <notifications@github.com>wrote:

> In lib/puppet/provider/group/gpasswd.rb:
>
> > +
> > +  has_feature :manages_members unless %w{HP-UX Solaris}.include? Facter.value(:operatingsystem)
> > +
> > +  def addcmd
> > +    cmd = []
> > +    cmd << super.shelljoin
> > +
> > +    @resource[:members] and cmd << @resource[:members].map{ |x|
> > +      [ command(:addmember),'-a',x,@resource[:name] ].shelljoin
> > +    }
> > +
> > +    # NOTE: This will create the group but may not add some members to
> > +    # your group if they do not exist on the system. Any member that
> > +    # can be added will be added in an attempt to do "the right
> > +    # thing".
> > +    cmd.join(' && ')
>
> If we need to run multiple commands to complete a single task then we
> should make separate calls to Puppet::Util::Execution.execute; using
> ampersands to generate a shell pipeline isn't a good approach.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/puppetlabs/puppet/pull/1848/files#r6802618>
> .
>



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvaughan@onyxpoint.com

-- This account not approved for unencrypted proprietary information --