Re: [Puppet Users] Glassfish asadmin provider

2010-09-16 Thread lists
Hi, Thanks for all suggestions! I finally went for Nan Liu's solution by checking the $PATH environment variable for an executable. The resulting commit is here: http://github.com/larstobi/puppet-glassfish/commit/047f82 diff --git a/lib/puppet/provider/glassfish/asadmin.rb b/lib/puppet/provide

Re: [Puppet Users] Glassfish asadmin provider

2010-09-16 Thread Alan Barrett
On Wed, 15 Sep 2010, Nigel Kersten wrote: > Does 'type --all asdf' do the right thing on SunOS ? According to IEEE Std 1003.1, 2004 Edition, "type" does not take any options. Anyway, on Solaris-5.8: for shell in /bin/sh /usr/xpg4/bin/sh /bin/ksh /usr/local/bin/bash ; do echo "[$shell]"; ${shell}

Re: [Puppet Users] Glassfish asadmin provider

2010-09-15 Thread Darren Chamberlain
* Darren Chamberlain [2010/09/15 15:41]: > * Nigel Kersten [2010/09/15 12:30]: > > Does 'type --all asdf' do the right thing on SunOS ? > > $ uname -a ; /bin/type --all asdf ; echo $? > SunOS smacky 5.10 Generic_142900-03 sun4v sparc SUNW,Sun-Fire-T200 Solaris > asdf not found > 127 > >

Re: [Puppet Users] Glassfish asadmin provider

2010-09-15 Thread Darren Chamberlain
* Nigel Kersten [2010/09/15 12:30]: > On Wed, Sep 15, 2010 at 12:25 PM, Darren Chamberlain > wrote: > > I have no comment on the general approach, but just wanted to point > > out that checking $? doesn't necessarily work everywhere: > > > > $ uname -a ; which asdf ; echo $? > > SunOS smacky

Re: [Puppet Users] Glassfish asadmin provider

2010-09-15 Thread Nigel Kersten
On Wed, Sep 15, 2010 at 12:25 PM, Darren Chamberlain wrote: > * Nan Liu [2010/09/15 12:08]: >> Check some hard coded path, and tries to detect if it's available in $PATH >> using which: >> >> case >> when File.executable?("/opt/NSBglassfish/bin/asadmin") >>   commands :asadmin => "/opt/NSBglassfi

Re: [Puppet Users] Glassfish asadmin provider

2010-09-15 Thread Darren Chamberlain
* Nan Liu [2010/09/15 12:08]: > Check some hard coded path, and tries to detect if it's available in $PATH > using which: > > case > when File.executable?("/opt/NSBglassfish/bin/asadmin") > commands :asadmin => "/opt/NSBglassfish/bin/asadmin" > when File.executable?("/usr/local/NSBglassfish/bin

Re: [Puppet Users] Glassfish asadmin provider

2010-09-15 Thread Nan Liu
2010/9/14 Lars Tobias Skjong-Børsting > I am making a resource type to manage Glassfish domains. I'm not quite sure > how to specify provider commands with a sane default and in configurable > way. The location of the binary may be in other locations depending on where > Glassfish was installed.

[Puppet Users] Glassfish asadmin provider

2010-09-15 Thread Lars Tobias Skjong-Børsting
Hi, I am making a resource type to manage Glassfish domains. I'm not quite sure how to specify provider commands with a sane default and in configurable way. The location of the binary may be in other locations depending on where Glassfish was installed. http://github.com/larstobi/puppet-gla