summaryrefslogtreecommitdiff
path: root/sys-apps/cciss_vol_status/files/cciss_vol_status.cron
blob: 8d1175b45678e045c88575f4cc2964fc256f65ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

test -x /usr/bin/cciss_vol_status || exit 0

STATUS=0

if [ -d /proc/driver/cciss ]; then
   DEVS=`awk -F: '/^cciss\/c.*d0/{print "/dev/" $1}' /proc/driver/cciss/cciss*`
   OUTPUT=`/usr/bin/cciss_vol_status $DEVS`
   if [ $? -ne 0 ];  then
        printf "%s\n" "$OUTPUT"
        exit 1
   fi
fi
# FIXME: This cronjob should also look at the scsi generic nodes
# (/dev/sg*?) to cover the hpsa driver, fibre-attached MSA1000 family
# devices, orthehpahcisr software RAID driver (see cciss_vol_status(8)
# about how to choose the correct nodes -- i don't use these other
# devices, so i cannot verify how to check them cleanly)
#
exit 0