Issue #3325 has been updated by Ben Hughes. Status changed from Investigating to Closed
Hello, I am going through old Puppet tickets and this one has been dormant for a long time. If this is still an issue please let us know and/or re-open the ticket please. Thanks. This looks like it's just a quoting issue. If it's not and is still broken in 2.6.x please reopen, thanks. ---------------------------------------- Bug #3325: Exec failure, possibly because `` or system() in the command https://projects.puppetlabs.com/issues/3325 Author: Roy Nielsen Status: Closed Priority: Normal Assignee: Markus Roberts Category: exec Target version: Affected Puppet version: 0.25.1 Keywords: exec spawn Branch: I'm using puppet 0.25.1 - and I'm trying to create a custom resource to use launchctl to stop a launchd job. command => "launchctl stop `launchctl list | grep $job_real | cut -f 3`", yeilds: err: //sav/Stop_launchd_job[com.Symantec.SymSecondaryLaunch]/Exec[com.Symantec.SymSecondaryLaunch]/returns: change from notrun to 0 failed: launchctl stop `launchctl list | grep com.Symantec.SymSecondaryLaunch | cut -f 3` returned 1 instead of one of [0] at /var/puppet/environments/development/modules/lanl-baseline/manifests/definitions/stop_launchd_job.pp:49 and command => "launchctl list | awk /$job_real/'{system(\"launchctl stop \" \"\\\"\"\$3\"\\\"\");}'`", yeilds: err: //sav/Stop_launchd_job[com.Symantec.SymSecondaryLaunch]/Exec[com.Symantec.SymSecondaryLaunch]/returns: change from notrun to 0 failed: launchctl list | awk /com.Symantec.SymSecondaryLaunch/'{system("launchctl stop " "\""$3"\"");}'` returned 2 instead of one of [0] at /var/puppet/environments/development/modules/lanl-baseline/manifests/definitions/stop_launchd_job.pp:49 Both commands work when done at the command-line (as seen in the error...) and return 0 (when run at the command line). Is the problem that with either command I'm either doing a `` or system() call in the "command"? If you'd like me to post the whole resource, I'd be happy to. -Roy Nielsen -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
