Re: [Puppet Users] Re: Puppet recipe to copy and execute a shell file

2011-06-17 Thread Annie Rana
le['blah'] > } > > That way you ensure the file is created before you try to run the exec. > > -- > Nathan Clemons > http://www.livemocha.com > The worlds largest online language learning community > > > > On Fri, Jun 17, 2011 at 10:43 AM, Annie Rana

Re: [Puppet Users] Re: Puppet recipe to copy and execute a shell file

2011-06-17 Thread Annie Rana
mangle -A FORWARD -i eth1 -o eth0 -p udp --sport > 2345 -j TOS --set-tos 0x28' returned 2 > Command 'iptables -t mangle -A FORWARD -i eth1 -o eth0 -p udp --sport > 2345 -j TOS --set-tos 0x28' output '' > Command 'iptables-save' returned 0 > Command &

Re: [Puppet Users] Re: Puppet recipe to copy and execute a shell file

2011-06-17 Thread Annie Rana
one thing that there is no issue with the shell script itself. The exec command is having hiccup even before executing the shell. I even tried command paremeter in exec but no use. Do you know anyother way to execute bash shell in puppet? Thanks much, Annie On Fri, Jun 17, 2011 at 4:30 PM, An

Re: [Puppet Users] Re: Puppet recipe to copy and execute a shell file

2011-06-17 Thread Annie Rana
--set-tos 0x28" > OUT=$($CMD) >> /tmp/QoS.out 2>&1 > RET=$? > print "Command $CMD returned $RET" >> /tmp/QoS.out 2>&1 > CMD="iptables-save" > OUT=$($CMD) >> /tmp/QoS.out 2>&1 > RET=$? > print "Command $CMD r

Re: [Puppet Users] Re: Puppet recipe to copy and execute a shell file

2011-06-17 Thread Annie Rana
-- > Peter M. Bukowinski > Systems Engineer > Janelia Farm Research Campus, HHMI > > On Friday, June 17, 2011 at 10:44 AM, Annie Rana wrote: > > > Hi Luke, > > What's your shell script expected to > > do? > > The shell script would generate Iptables rule

Re: [Puppet Users] Re: Puppet recipe to copy and execute a shell file

2011-06-17 Thread Annie Rana
s 0x88 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -j RETURN #save iptables rules iptables-save ======== On Fri, Jun 17, 2011 at 3:44 PM, Annie Rana wrote: > Hi Luke, > What's your shell script expected to > do? &g

Re: [Puppet Users] Re: Puppet recipe to copy and execute a shell file

2011-06-17 Thread Annie Rana
't work? What's your shell script expected to > do? If you run it by hand in a root shell, does it work then? If so, > there might be an environment problem when running from Puppet, like > $PATH or something. Try set the parameter "logoutput => true" in the

Re: [Puppet Users] Re: Puppet recipe to copy and execute a shell file

2011-06-17 Thread Annie Rana
zero, your script is > returning 1. Whether this is correct or not I don't know, but you can > tell puppet to expect a different return code: > > exec { '/etc/shell_file': > require => File['/etc/shell_file'], > returns => 1, > } > > On Jun

Re: [Puppet Users] Puppet recipe to copy and execute a shell file

2011-06-17 Thread Annie Rana
notice: Finished catalog run in 0.46 seconds Any help please? On Fri, Jun 17, 2011 at 2:09 PM, Annie Rana wrote: > Hi Peter, thanks for your reply. I managed to copy the shell file puppet > client using the file resource recipe you specified but exec is throwing an > error, which is a

Re: [Puppet Users] Puppet recipe to copy and execute a shell file

2011-06-17 Thread Annie Rana
Hi Peter, thanks for your reply. I managed to copy the shell file puppet client using the file resource recipe you specified but exec is throwing an error, which is as follows: info: No classes to store info: Caching catalog at /var/lib/puppet/state/localconfig.yaml notice: Starting catalog run er