add Power_On_Hours Reallocated_Sector_Ct
[gnt-info] / gnt-running.sh
index f65b3d9..415fabb 100755 (executable)
@@ -1,4 +1,10 @@
-#!/bin/sh -xe
+#!/bin/sh -e
 while true ; do
-gnt-job list --no-headers --running | tee /dev/stderr | awk '{ print $1 }' | xargs gnt-job watch
+  JOBID=`gnt-job list --no-headers --running | tee /dev/stderr | grep -v GROUP_VERIFY_DISKS | awk '{ print $1; exit }'`
+  if [ -n "$JOBID" ]
+  then
+       gnt-job watch $JOBID || true # don't exit on failed jobs
+  else
+       sleep 5
+  fi
 done