Since sed is the last command and it's always exiting cleanly, you'll always 
have a return value of 0. I'd create a wrapper script around that and do your 
work in the script. This way you can properly save the return values and exit 
accordingly.

You could maybe call it check_nt_wrapper.sh


Code:

#!/bin/bash
DISK_VAL=`<your_check_nt_command_here>`
DISK_RET_VAL=$?

CLEAN_OUTPUT=`echo $DISK_VAL | <your_sed_command_here>`

echo $CLEAN_OUTPUT
exit $DISK_RET_VAL




Call this wrapper script as your command, within Zenoss. This way you've saved 
the return value from the check_nt command, instead of the sed command and you 
can exit accordingly.




-------------------- m2f --------------------

Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=23596#23596

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to