Re: [Puppet Users] Why does the Puppet-Agent on Windows use a batch file?

2013-10-31 Thread Glenn Sarti
On Thursday, October 31, 2013 11:54:19 AM UTC+8, Josh Cooper wrote: > > On Wed, Oct 30, 2013 at 8:41 PM, Glenn Sarti > > > wrote: > >> Well that was easier than I expected >> >> * daemon.rb now defaults to logging in the Event Log and optionally to >> the windows.log file >> > > This sho

Re: [Puppet Users] Why does the Puppet-Agent on Windows use a batch file?

2013-10-30 Thread Josh Cooper
On Wed, Oct 30, 2013 at 6:06 PM, Glenn Sarti wrote: > * A side effect of not running the daemon from a CMD.EXE was that the >> call to get to runinterval was failing. I suspect this is due to STDOUT >> not being available anymore. So I used the well worn method of pipe the >> output to a file

Re: [Puppet Users] Why does the Puppet-Agent on Windows use a batch file?

2013-10-30 Thread Josh Cooper
On Wed, Oct 30, 2013 at 8:41 PM, Glenn Sarti wrote: > Well that was easier than I expected > > * daemon.rb now defaults to logging in the Event Log and optionally to the > windows.log file > This should resolve https://projects.puppetlabs.com/issues/21641. Can you submit a PR for this issue? >

Re: [Puppet Users] Why does the Puppet-Agent on Windows use a batch file?

2013-10-30 Thread Glenn Sarti
Well that was easier than I expected * daemon.rb now defaults to logging in the Event Log and optionally to the windows.log file * The ImagePath string now looks like; "C:\Program Files (x86)\Puppet Labs\Puppet Enterprise\sys\ruby\bin\ruby.exe" -rubygems -C"C:\Program Files (x86)\Puppet Labs

Re: [Puppet Users] Why does the Puppet-Agent on Windows use a batch file?

2013-10-30 Thread Glenn Sarti
I also noticed there is a puppetres.dll and puppetres.mc file so I'll investigate that and use it for the EventLog stuff. https://github.com/puppetlabs/puppet/tree/master/ext/windows/eventlog -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To

Re: [Puppet Users] Why does the Puppet-Agent on Windows use a batch file?

2013-10-30 Thread Glenn Sarti
> > * A side effect of not running the daemon from a CMD.EXE was that the > call to get to runinterval was failing. I suspect this is due to STDOUT > not being available anymore. So I used the well worn method of pipe the > output to a file and read that instead (Lines 60-79). I still need t

Re: [Puppet Users] Why does the Puppet-Agent on Windows use a batch file?

2013-10-30 Thread Glenn Sarti
Hi Josh, After a lot of digging around, I think I have partial solution; NOTE - This is my first attempt at writing ruby so I expect there are some issues with what I've written. I only had a single host (Server 2008 R2 64bit) to test this on, but I believe the changes I've made are generic

Re: [Puppet Users] Why does the Puppet-Agent on Windows use a batch file?

2013-10-14 Thread Josh Cooper
Hi Glenn, On Sun, Oct 13, 2013 at 6:28 PM, Glenn Sarti wrote: > Why does the Puppet-Agent on Windows use a batch file? > Because the service and command line invocations, e.g. puppet apply, both need to setup their environment to run ruby, e.g. RUBYLIB, etc. The easiest way to do that was to cr