diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-27 19:53:02 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-12-27 19:53:02 +0000 |
| commit | 65e76e837654671e51c4ae3cb132452d23a83cef (patch) | |
| tree | b581a3ff18d1ffc991133fabc5e7994e0c075b61 /bin | |
| parent | d3a7c28ac7ea9a68a024d89cf39f1f6502b0a900 (diff) | |
Fixing #353. It was as simple as exiting with a different error code depending on the results of the call.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1975 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/puppetrun | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/puppetrun b/bin/puppetrun index eca7d018a..4c438ee8b 100755 --- a/bin/puppetrun +++ b/bin/puppetrun @@ -342,11 +342,21 @@ while go print "Triggering %s\n" % host begin - client.run(tags, options[:ignoreschedules], options[:foreground]) + result = client.run(tags, options[:ignoreschedules], options[:foreground]) rescue => detail $stderr.print "Host %s failed: %s\n" % [host, detail] exit(2) end + + case result + when "success": exit(0) + when "running": + $stderr.print "Host %s is already running" % host + exit(3) + else + $stderr.print "Host %s returned unknown answer '%s'" % [host, result] + exit(12) + end end children[pid] = host else |
