cciss_vol_status.cron 646 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. test -x /usr/bin/cciss_vol_status || exit 0
  3. STATUS=0
  4. if [ -d /proc/driver/cciss ]; then
  5. DEVS=`awk -F: '/^cciss\/c.*d0/{print "/dev/" $1}' /proc/driver/cciss/cciss*`
  6. OUTPUT=`/usr/bin/cciss_vol_status $DEVS`
  7. if [ $? -ne 0 ]; then
  8. printf "%s\n" "$OUTPUT"
  9. exit 1
  10. fi
  11. fi
  12. # FIXME: This cronjob should also look at the scsi generic nodes
  13. # (/dev/sg*?) to cover the hpsa driver, fibre-attached MSA1000 family
  14. # devices, orthehpahcisr software RAID driver (see cciss_vol_status(8)
  15. # about how to choose the correct nodes -- i don't use these other
  16. # devices, so i cannot verify how to check them cleanly)
  17. #
  18. exit 0