Commit a1457e92 authored by remy's avatar remy
Browse files

some basic fixes

parent e99464a6
......@@ -28,12 +28,21 @@ do
if [[ ! "$disk" =~ "ATA_DELLBOSS" ]]; then
echo /dev/disk/by-id/$disk >> $LOG_FILE
smartcmd=`$SMARTCTL -H -d megaraid,0 /dev/disk/by-id/$disk`
echo ${smartcmd} |grep -q "SMART Status not supported"
echo ${smartcmd} |grep -q "PASSED"
if [ $? -eq 0 ]; then
smartrez=`$SMARTCTL -H /dev/disk/by-id/$disk | grep -E ${FILTER}`
smartrez="SMART not supported but test result is PASSED"
else
smartrez=`$SMARTCTL -H -d megaraid,0 /dev/disk/by-id/$disk |grep -E ${FILTER}`
echo ${smartcmd} |grep -Eq "SMART Status not supported|failed: cannot open"
if [ $? -eq 0 ]; then
smartrez=`$SMARTCTL -H /dev/disk/by-id/$disk | grep -E ${FILTER}`
else
smartrez=`$SMARTCTL -H -d megaraid,0 /dev/disk/by-id/$disk |grep -E ${FILTER}`
fi
fi
echo ${smartrez} >> $LOG_FILE
if [[ -n ${smartrez} ]]; then
echo ${smartrez} >> $LOG_FILE
else
echo "Unknown issue" >> $LOG_FILE
fi
fi
done
unzipping megacli:
cmd.run:
- name: unzip 8-07-14_MegaCLI.zip
- name: unzip /root/8-07-14_MegaCLI.zip
alienning megacli:
cmd.run:
- name: "alien --scripts Linux/MegaCli*.rpm"
- name: "alien --scripts /root/Linux/MegaCli*.rpm"
installing megacli:
cmd.run:
......
......@@ -5,3 +5,4 @@ installing requirements:
- zip
- unzip
- rpm
- libncurses5
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment