disk_io now checks if iostat is available. "done" is now always printed before exiting

This commit is contained in:
Patrick Stadler 2015-03-29 01:04:15 +01:00
parent c956283fbe
commit 6544ba03a0
2 changed files with 7 additions and 1 deletions

View File

@ -178,7 +178,8 @@ main_terminate () {
if [ -d $TEMP_DIR ]; then if [ -d $TEMP_DIR ]; then
rmdir $TEMP_DIR rmdir $TEMP_DIR
fi fi
verbose "done"
echo "done"
} }
main_print_docs () { main_print_docs () {

View File

@ -11,6 +11,11 @@ defaults () {
} }
start () { start () {
if ! command_exists iostat; then
echo "Warning: disk_io requires the command 'iostat' to be available"
return 1
fi
readonly fifo=$TEMP_DIR/$(unique_id)_disk_io readonly fifo=$TEMP_DIR/$(unique_id)_disk_io
mkfifo $fifo mkfifo $fifo