i’m trying to issue a command (wait sh -c “yum distribution-synchronization -y”) via a linux bigfix action script, however i have 2 problems.
if the exit code of the command !=0, i want to set an client setting. This works now because “wait” waits until the yum command completes an returns the exit code
if yum is running for 60minutes, terminate the process… This is a problem because ‘wait’ will wait until yum completes, so I can monitor the time it is running to terminate it. If i use ‘run’ instead of ‘wait’, it doesn’t appear to return an action exit code (probably because it issues the yum command and moves on).
I’m not sure how helpful this is, but I think you’ll have to still use the “wait” command from actionscript, and then wait on a shell script that does the timeout and kill of the yum command. I’m not a shell ninja though, so I’m not exactly sure how to do that from sh.