#!/bin/bash

sata_list="/sata*"
sata_array=(${sata_list})

for sata in ${sata_array[@]}; do
  df_h_result=`df -h | grep ${sata} | grep -v "86%" | grep -v "87%" | grep -v "88%" | grep -v "85%"`
  if [[ -z ${df_h_result} ]]; then
    umount ${sata}
  fi
done

/etc/init.d/xc_cdn.sh restart
