瀏覽代碼

Fix MD Raid state detection

Emmanuel Bouthenot 5 年之前
父節點
當前提交
ed472ac101
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/client/raid/scripts/raid

+ 1 - 1
plugins/client/raid/scripts/raid

@@ -123,7 +123,7 @@ result=0
 case "${TYPE}" in
     mdraid)
         status="$(mdadm --detail "${DEVICE}" 2>/dev/null | sed -r -n 's/^\s+State\s*:\s*([^ ]+)\s*$/\1/p')"
-        if [ "${status}" != 'clean' ]; then
+        if [ "${status}" != 'clean' ]  && [ "${status}" != 'active' ]; then
             result=1
         fi
         ;;