paul matthews
2009-Sep-28 14:46 UTC
[Puppet Users] Passing input to script within an exec statement fails
Hi, From the command line I can successfully perform this:- echo y | /mnt/Linux/install.sh Trying the same thing from an exec, though, fails and I''m not too sure how to get round it command => "(echo y | /mnt/Linux/install.sh)", err: //Node[host]/vm_post_install/Exec[install-xenserver-tools]/returns: change from notrun to 0 failed: (echo y | /mnt/Linux/install.sh) returned 1 instead of 0 at /etc/puppet/modules/vm_post_install/manifests/init.pp:30 I''ve tried without the brackets as well - same result Unfortunately, in this case the option does not exist to avoid the script (as I''m mounting an iso and running the package''s install script) Thanks Paul -- Paul Matthews ---------------------------------------------------------------------- --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Allan Marcus
2009-Sep-28 16:16 UTC
[Puppet Users] Re: Passing input to script within an exec statement fails
You could try to add path => "/bin:/usr/bin", for the echo command. --- Thanks, Allan Marcus 505-667-5666 On Sep 28, 2009, at 8:46 AM, paul matthews wrote:> Hi, > > From the command line I can successfully perform this:- > > echo y | /mnt/Linux/install.sh > > Trying the same thing from an exec, though, fails and I''m not too > sure how to get round it > > command => "(echo y | /mnt/Linux/install.sh)", > > err: //Node[host]/vm_post_install/Exec[install-xenserver-tools]/ > returns: change from notrun to 0 failed: (echo y | /mnt/Linux/ > install.sh) returned 1 instead of 0 at /etc/puppet/modules/ > vm_post_install/manifests/init.pp:30 > > I''ve tried without the brackets as well - same result > > Unfortunately, in this case the option does not exist to avoid the > script (as I''m mounting an iso and running the package''s install > script) > > Thanks > Paul > > > -- > Paul Matthews > ---------------------------------------------------------------------- > > >--~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
paul matthews
2009-Sep-29 09:23 UTC
[Puppet Users] Re: Passing input to script within an exec statement fails
Allan, superb! That''s what the problem was which turned out to be embarrassingly basic. I''d missed the /bin in my path statement Thanks Paul 2009/9/28 Allan Marcus <allan@lanl.gov>> > You could try to add > > path => "/bin:/usr/bin", > > for the echo command. > > --- > Thanks, > > Allan Marcus > 505-667-5666 > > > > On Sep 28, 2009, at 8:46 AM, paul matthews wrote: > > > Hi, > > > > From the command line I can successfully perform this:- > > > > echo y | /mnt/Linux/install.sh > > > > Trying the same thing from an exec, though, fails and I''m not too > > sure how to get round it > > > > command => "(echo y | /mnt/Linux/install.sh)", > > > > err: //Node[host]/vm_post_install/Exec[install-xenserver-tools]/ > > returns: change from notrun to 0 failed: (echo y | /mnt/Linux/ > > install.sh) returned 1 instead of 0 at /etc/puppet/modules/ > > vm_post_install/manifests/init.pp:30 > > > > I''ve tried without the brackets as well - same result > > > > Unfortunately, in this case the option does not exist to avoid the > > script (as I''m mounting an iso and running the package''s install > > script) > > > > Thanks > > Paul > > > > > > -- > > Paul Matthews > > ---------------------------------------------------------------------- > > > > > > > > > >-- Paul Matthews ---------------------------------------------------------------------- --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---