Whamcloud - gitweb
LU-3973 tests: use -P option of df to avoid line breaks
[fs/lustre-release.git] / lustre / tests / sanity-hsm.sh
index ee25dcb..04bcd65 100644 (file)
@@ -400,7 +400,8 @@ make_small() {
 }
 
 cleanup_large_files() {
-       local ratio=$(df $MOUNT |awk '{print $5}' |sed 's/%//g' |grep -v Use)
+       local ratio=$(df -P $MOUNT | tail -1 | awk '{print $5}' |
+                     sed 's/%//g')
        [ $ratio -gt 50 ] && find $MOUNT -size +10M -exec rm -f {} \;
 }