Description of problem: remote command worked with expected output, but event history returned error From satellite server, run a remote command to a rhel 6 client: yum check-update Version-Release number of selected component (if applicable): satellite-5.5.0-20120911 How reproducible: always Steps to Reproduce: 1. System -> select a system -> remote command 2. Enter "yum check-update" in the script text entry box 3. schedule a remote command and check the event history Actual results: command return the expected output (list of packages need to update), but status is: Failed Expected results: Action's status should be: Completed Additional info:
Well, the status of the return command depends on the return code of the remote command. On my machine: * if there're no updates: # yum check-update > /dev/null; echo $? 0 * if there're updates available: # yum check-update > /dev/null; echo $? 100 So, if your script returns a non-zero value, the remote command is considered as failed. Recommended usage: ======================================================= #!/bin/sh yum check-update RET=$? if [ $RET -eq 100 ]; then exit 0; else exit $RET; fi ======================================================= Closing as NOTABUG.