In a recent version of Puppet - one that provides the `shell` and
`exec` providers for exec - none of this should be necessary.

If you give the `shell` provider, you will get your command run with
the default shell, which should do the right thing.  (Obviously, if
the Solaris `/bin/sh` doesn't like your code, it won't work ;)

Daniel

On Wed, Jan 11, 2012 at 03:12, Andrew Hendry <andrew.hen...@gmail.com> wrote:
> Did you sort this one out? I also found out puppet on some solaris
> systems doesn't like [ or ( as first character.
> A hack to get past it was to change the first character
> $command = "true && ( /apps/path/scripts/install.sh || true )  && touch /etc/
>
> On Fri, Jan 6, 2012 at 7:52 AM, Jo Rhett <jrh...@netconsonance.com> wrote:
>> On Jan 5, 2012, at 7:42 AM, ollies...@googlemail.com wrote:
>>
>> $command = "( /apps/path/scripts/install.sh || true )  && touch /etc/
>> puppet/puppet.script.done"
>>
>>        exec { install:
>>            command     => "$command",
>>
>>
>> Remember that putting something in double quotes is a request to have the
>> value (re)evaluated for metacharacters. I doubt you want this.  I would put
>> the command itself in single quotes, and then just use
>>
>>            command     => $command,
>>
>>
>> ...since what you want is for the shell, and not puppet, to be evaluating
>> those metacharacters.
>>
>> --
>> Jo Rhett
>> Net Consonance : consonant endings by net philanthropy, open source and
>> other randomness
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To post to this group, send email to puppet-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Daniel Pittman
⎋ Puppet Labs Developer – http://puppetlabs.com
♲ Made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to