Update output of check script
This commit is contained in:
@@ -47,10 +47,22 @@ CheckIQN() {
|
||||
|
||||
MOUNTPOINT=$(grep "${BLOCKDEVICE}" /proc/mounts | head -n 1 | cut -d " " -f 2)
|
||||
|
||||
echo -n "${IQN}: "
|
||||
|
||||
RETURNCODE=0
|
||||
if [[ -z "${MOUNTPOINT}" || ! -d "${MOUNTPOINT}" ]]; then
|
||||
fsck -f ${BLOCKDEVICE}
|
||||
fsck -f ${BLOCKDEVICE} &> /dev/null
|
||||
RETURNCODE=$?
|
||||
else
|
||||
fsck -nf ${BLOCKDEVICE}
|
||||
fsck -nf ${BLOCKDEVICE} &> /dev/null
|
||||
RETURNCODE=$?
|
||||
fi
|
||||
|
||||
if [ "${RETURNCODE}" -ne "0" ]; then
|
||||
echo "ERROR"
|
||||
echo " ${BLOCKDEVICE} contains errors, please check the filesystem"
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user