Re: [Puppet Users] dpkg in puppet returns 2 but at command line returns 0
Thanks! adding /usr/sbin and /sbin seems to have fixed it. On Mon, Jul 12, 2010 at 7:17 PM, Rohan McGovern wrote: > ext Jon Choate said: > > I have an exec defined as > > > > exec {"dpkg --configure -a": > >path => "/usr/bin:/bin", > >user => root > > } > > > > puppet complains: > > > > Exec[dpkg --configure -a]/returns: change from notrun to 0 failed: dpkg > --configure -a returned 2 instead of one of [0] > > > > but when I run dpkg --configure -a outside puppet it returns 0. > > > > Has anyone ever seen this before or have any insights? > > > > The last time someone reported a problem like this on the mailing list, > it was because the command had to run a subcommand which was not in > PATH. > > In particular, `dpkg --configure' runs postinst scripts for packages > and these might do absolutely anything... at the very least I would > expect that /usr/sbin and /sbin probably need to be in PATH too :-) > -- > Rohan McGovern > QA Engineer > Qt Development Frameworks, Nokia > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.
Re: [Puppet Users] dpkg in puppet returns 2 but at command line returns 0
ext Jon Choate said: > I have an exec defined as > > exec {"dpkg --configure -a": >path => "/usr/bin:/bin", >user => root > } > > puppet complains: > > Exec[dpkg --configure -a]/returns: change from notrun to 0 failed: dpkg > --configure -a returned 2 instead of one of [0] > > but when I run dpkg --configure -a outside puppet it returns 0. > > Has anyone ever seen this before or have any insights? > The last time someone reported a problem like this on the mailing list, it was because the command had to run a subcommand which was not in PATH. In particular, `dpkg --configure' runs postinst scripts for packages and these might do absolutely anything... at the very least I would expect that /usr/sbin and /sbin probably need to be in PATH too :-) -- Rohan McGovern QA Engineer Qt Development Frameworks, Nokia -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.
Re: [Puppet Users] dpkg in puppet returns 2 but at command line returns 0
On Jul 12, 2010, at 12:00 PM, Jon Choate wrote: I have an exec defined as exec {"dpkg --configure -a": path => "/usr/bin:/bin", user => root } puppet complains: Exec[dpkg --configure -a]/returns: change from notrun to 0 failed: dpkg --configure -a returned 2 instead of one of [0] but when I run dpkg --configure -a outside puppet it returns 0. Has anyone ever seen this before or have any insights? It's almost got to be something related to your environment or your access (i.e., the user you run the commands as). -- I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me. -- Hunter S. Thompson - Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.
[Puppet Users] dpkg in puppet returns 2 but at command line returns 0
I have an exec defined as exec {"dpkg --configure -a": path => "/usr/bin:/bin", user => root } puppet complains: Exec[dpkg --configure -a]/returns: change from notrun to 0 failed: dpkg --configure -a returned 2 instead of one of [0] but when I run dpkg --configure -a outside puppet it returns 0. Has anyone ever seen this before or have any insights? thanks! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.